Search Results for

    Show / Hide Table of Contents

    Method TryGetUShortValue

    | Improve this Doc View Source

    TryGetUShortValue(String, out UInt16)

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

    Declaration
    public virtual bool TryGetUShortValue(string variable, out ushort value)
    Parameters
    Type Name Description
    String variable

    The variable name of the value to try retrieve.

    UInt16 value

    The ushort value retrieved or 0.

    Returns
    Type Description
    Boolean

    true if the variable is set, otherwise false.

    Implements
    IEnvReader.TryGetUShortValue(String, out UInt16)
    Exceptions
    Type Condition
    ArgumentNullException

    variable is null.

    FormatException

    value is not in ushort format.

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