Search Results for

    Show / Hide Table of Contents

    Method TryGetIntValue

    | Improve this Doc View Source

    TryGetIntValue(String, out Int32)

    Try to retrieve the value of a variable in int format.

    Declaration
    bool TryGetIntValue(string variable, out int value)
    Parameters
    Type Name Description
    String variable

    The variable name of the value to try retrieve.

    Int32 value

    The int value retrieved or 0.

    Returns
    Type Description
    Boolean

    true if the variable is set, otherwise false.

    Exceptions
    Type Condition
    ArgumentNullException

    variable is null.

    FormatException

    value is not in int format.

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