Search Results for

    Show / Hide Table of Contents

    Method IsEnvironment

    | Improve this Doc View Source

    IsEnvironment(String)

    Compares the current environment name against the specified value.

    Declaration
    public static bool IsEnvironment(string environmentName)
    Parameters
    Type Name Description
    String environmentName

    The environment name to validate against.

    Returns
    Type Description
    Boolean

    true if the specified name is the same as the current environment, otherwise false.

    Exceptions
    Type Condition
    ArgumentNullException

    environmentName is null.

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