Search Results for

    Show / Hide Table of Contents

    Struct Optional<T>

    Namespace: Discord
    Assembly: Discord.Net.Core.dll
    Syntax
    public struct Optional<T>
    Type Parameters
    Name Description
    T

    Constructors

    | Improve this Doc View Source

    Optional(T)

    Creates a new Parameter with the provided value.

    Declaration
    public Optional(T value)
    Parameters
    Type Name Description
    T value

    Properties

    | Improve this Doc View Source

    IsSpecified

    Returns true if this value has been specified.

    Declaration
    public readonly bool IsSpecified { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Unspecified

    Declaration
    public static readonly Optional<T> Unspecified { get; }
    Property Value
    Type Description
    Optional<T>
    | Improve this Doc View Source

    Value

    Gets the value for this parameter.

    Declaration
    public readonly T Value { get; }
    Property Value
    Type Description
    T

    Methods

    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object other)
    Parameters
    Type Name Description
    Object other
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    GetValueOrDefault()

    Declaration
    public T GetValueOrDefault()
    Returns
    Type Description
    T
    | Improve this Doc View Source

    GetValueOrDefault(T)

    Declaration
    public T GetValueOrDefault(T defaultValue)
    Parameters
    Type Name Description
    T defaultValue
    Returns
    Type Description
    T
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    Operators

    | Improve this Doc View Source

    Explicit(Optional<T> to T)

    Declaration
    public static explicit operator T(Optional<T> value)
    Parameters
    Type Name Description
    Optional<T> value
    Returns
    Type Description
    T
    | Improve this Doc View Source

    Implicit(T to Optional<T>)

    Declaration
    public static implicit operator Optional<T>(T value)
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    Optional<T>

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2023 3.10.0