NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Environment.GetEnvironmentVariable

Gets the specified environment variable.

[Visual Basic]
Public Shared Function GetEnvironmentVariable( _
   ByVal variable As String _
) As String
[C#]
public static string GetEnvironmentVariable(
   string variable
);
[C++]
public: static String* GetEnvironmentVariable(
   String* variable
);
[JScript]
public static function GetEnvironmentVariable(
   variable : String
) : String;

Parameters

variable
the environment variable that is sought

Return Value

The value (in string form) of the system environment variable given. If the specified environment variable is not found, null is returned.

Exceptions

Exception Type Condition
ArgumentException variable is null.
SecurityException The caller does not have EnvironmentPermission with Read access.

See Also

Environment Class | Environment Members | System Namespace