Class Optional
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
Helper methods for instantiating an Optional<T>.
public static class Optional
- Inheritance
-
Optional
Remarks
This class only serves to allow type parameter inference on calls to FromValue<T>(T) or FromNoValue<T>().
Methods
- FromNoValue<T>()
Creates a new empty Optional<T> with no value and invalid state.
- FromValue<T>(T)
Creates a new Optional<T> with specified value and valid state.