Search Results for

    Show / Hide Table of Contents

    Method EnvString

    | Improve this Doc View Source

    EnvString(String, String)

    Gets the value of a variable in string format.

    Declaration
    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 string format.

    Remarks

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

    Exceptions
    Type Condition
    ArgumentNullException

    variable is null.

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