Method GetPropertyAsInt32
GetPropertyAsInt32(String)
Retrieves the value of an environment variable from the current process
as 0
.
Declaration
public static int GetPropertyAsInt32(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The name of the environment variable. |
Returns
Type | Description |
---|---|
System.Int32 | The environment variable value. |
GetPropertyAsInt32(String, Int32)
Retrieves the value of an environment variable from the current process as
Declaration
public static int GetPropertyAsInt32(string key, int defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The name of the environment variable. |
System.Int32 | 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.Int32 | The environment variable value. |