Method EnvString
| Improve this Doc View SourceEnvString(String, String)
Gets the value of a variable in string
format.
Declaration
public virtual string EnvString(string variable, string defaultValue = null)
Parameters
Type | Name | Description |
---|---|---|
String | variable | Environment variable name. |
String | defaultValue | A default value in case the variable is not set. |
Returns
Type | Description |
---|---|
String | A value of the environment variable in |
Implements
Remarks
If the environment variable is not set, the method will return the default value.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|