Search Results for

    Show / Hide Table of Contents

    Method TryGetDecimalValue

    | Improve this Doc View Source

    TryGetDecimalValue(String, out Decimal)

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

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

    The variable name of the value to try retrieve.

    Decimal value

    The decimal value retrieved or 0.0.

    Returns
    Type Description
    Boolean

    true if the variable is set, otherwise false.

    Implements
    IEnvReader.TryGetDecimalValue(String, out Decimal)
    Exceptions
    Type Condition
    ArgumentNullException

    variable is null.

    FormatException

    value is not in decimal format.

    • Improve this Doc
    • View Source
    In This Article
    • TryGetDecimalValue(String, out Decimal)
    Back to top Copyright ©2021 DotEnv.Core