Search Results for

    Show / Hide Table of Contents

    Method TryGetFloatValue

    | Improve this Doc View Source

    TryGetFloatValue(String, out Single)

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

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

    The variable name of the value to try retrieve.

    Single value

    The float value retrieved or 0.0.

    Returns
    Type Description
    Boolean

    true if the variable is set, otherwise false.

    Implements
    IEnvReader.TryGetFloatValue(String, out Single)
    Exceptions
    Type Condition
    ArgumentNullException

    variable is null.

    FormatException

    value is not in float format.

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