Struct Optional<T>
Assembly: Discord.Net.Core.dll
Syntax
public struct Optional<T>
Type Parameters
Constructors
|
Improve this Doc
View Source
Optional(T)
Creates a new Parameter with the provided value.
Declaration
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
|
Improve this Doc
View Source
Unspecified
Declaration
public static readonly Optional<T> Unspecified { get; }
Property Value
|
Improve this Doc
View Source
Value
Gets the value for this parameter.
Declaration
public readonly T Value { get; }
Property Value
Methods
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
Object |
other |
|
Returns
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
|
Improve this Doc
View Source
GetValueOrDefault()
Declaration
public T GetValueOrDefault()
Returns
|
Improve this Doc
View Source
GetValueOrDefault(T)
Declaration
public T GetValueOrDefault(T defaultValue)
Parameters
Type |
Name |
Description |
T |
defaultValue |
|
Returns
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Operators
|
Improve this Doc
View Source
Explicit(Optional<T> to T)
Declaration
public static explicit operator T(Optional<T> value)
Parameters
Returns
|
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