Class Optional
Inheritance
System.Object
Optional
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public static class Optional
Methods
| Improve this Doc View SourceCreate<T>()
Declaration
public static Optional<T> Create<T>()
Returns
| Type | Description |
|---|---|
| Optional<T> |
Type Parameters
| Name | Description |
|---|---|
| T |
Create<T>(T)
Declaration
public static Optional<T> Create<T>(T value)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value |
Returns
| Type | Description |
|---|---|
| Optional<T> |
Type Parameters
| Name | Description |
|---|---|
| T |
ToNullable<T>(Optional<T>)
Declaration
public static T? ToNullable<T>(this Optional<T> val)
where T : struct
Parameters
| Type | Name | Description |
|---|---|---|
| Optional<T> | val |
Returns
| Type | Description |
|---|---|
| System.Nullable<T> |
Type Parameters
| Name | Description |
|---|---|
| T |