Search Results for

    Show / Hide Table of Contents

    Method SetEncoding

    | Improve this Doc View Source

    SetEncoding(Encoding)

    Sets the encoding of the .env files.

    Declaration
    public IEnvLoader SetEncoding(Encoding encoding)
    Parameters
    Type Name Description
    Encoding encoding

    The type of encoding to set.

    Returns
    Type Description
    IEnvLoader

    An instance implementing the fluent interface.

    Implements
    IEnvLoader.SetEncoding(Encoding)
    Exceptions
    Type Condition
    ArgumentNullException

    encoding is null.

    | Improve this Doc View Source

    SetEncoding(String)

    Sets the encoding name of the .env files.

    Declaration
    public IEnvLoader SetEncoding(string encodingName)
    Parameters
    Type Name Description
    String encodingName

    The name of encoding to set.

    Returns
    Type Description
    IEnvLoader

    An instance implementing the fluent interface.

    Implements
    IEnvLoader.SetEncoding(String)
    Exceptions
    Type Condition
    ArgumentException

    encodingName is not a valid code page name or is not supported by the underlying platform.

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