Struct Optional<T>
Assembly: Discord.Net.Core.dll​
View Source​
Declaration
public struct Optional<T>
Properties​
Unspecified​
View Source​
Declaration
public static readonly Optional<T> Unspecified { get; }
Value​
Gets the value for this parameter.
View Source​
Declaration
public readonly T Value { get; }
IsSpecified​
Returns true if this value has been specified.
View Source​
Declaration
public readonly bool IsSpecified { get; }
Methods​
GetValueOrDefault()​
View Source​
Declaration
public T GetValueOrDefault()
Returns​
<T>
GetValueOrDefault(T)​
View Source​
Declaration
public T GetValueOrDefault(T defaultValue)
Returns​
<T>
Parameters​
Type | Name |
---|---|
<T> | defaultValue |
Equals(Object)​
View Source​
Declaration
public override bool Equals(object other)
Returns​
System.Boolean
Parameters​
Type | Name |
---|---|
System.Object | other |
GetHashCode()​
View Source​
Declaration
public override int GetHashCode()
Returns​
System.Int32
ToString()​
View Source​
Declaration
public override string ToString()
Returns​
System.String