Method EnvUShort
| Improve this Doc View SourceEnvUShort(String, UInt16)
Gets the value of a variable in ushort
format.
Declaration
ushort EnvUShort(string variable, ushort defaultValue = 0)
Parameters
Type | Name | Description |
---|---|---|
String | variable | Environment variable name. |
UInt16 | defaultValue | A default value in case the variable is not set. |
Returns
Type | Description |
---|---|
UInt16 | A value of the environment variable in |
Remarks
If the environment variable is not set, the method will return the default value.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
FormatException |
|