Method EnvFloat
| Improve this Doc View SourceEnvFloat(String, Single)
Gets the value of a variable in float format.
Declaration
public virtual float EnvFloat(string variable, float defaultValue = 0F)
Parameters
| Type | Name | Description |
|---|---|---|
| String | variable | Environment variable name. |
| Single | defaultValue | A default value in case the variable is not set. |
Returns
| Type | Description |
|---|---|
| Single | 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 |
|
| FormatException |
|