Method GetPropertyAsBoolean
GetPropertyAsBoolean(String)
Retrieves the value of an environment variable from the current process
as false
.
Declaration
public static bool GetPropertyAsBoolean(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The name of the environment variable. |
Returns
Type | Description |
---|---|
System.Boolean | The environment variable value. |
GetPropertyAsBoolean(String, Boolean)
Retrieves the value of an environment variable from the current process as
Declaration
public static bool GetPropertyAsBoolean(string key, bool defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The name of the environment variable. |
System.Boolean | defaultValue | The value to use if the environment variable does not exist,
the caller doesn't have permission to read the value, or the value cannot be cast to |
Returns
Type | Description |
---|---|
System.Boolean | The environment variable value. |