Search Results for

    Show / Hide Table of Contents

    Method EnvLong

    | Improve this Doc View Source

    EnvLong(String, Int64)

    Gets the value of a variable in long format.

    Declaration
    public virtual long EnvLong(string variable, long defaultValue = 0L)
    Parameters
    Type Name Description
    String variable

    Environment variable name.

    Int64 defaultValue

    A default value in case the variable is not set.

    Returns
    Type Description
    Int64

    A value of the environment variable in long format.

    Implements
    IEnvReader.EnvLong(String, Int64)
    Remarks

    If the environment variable is not set, the method will return the default value.

    Exceptions
    Type Condition
    ArgumentNullException

    variable is null.

    FormatException

    value is not in long format.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright ©2021 DotEnv.Core