OneOfT1T2T3 Class
OneOf<T1,T2,T3> class
Represents a value that can be one of three distinct types, T1, T2, or T3.
public class OneOf<T1, T2, T3>
| Parameter | Description |
|---|
| T1 | The type of the first possible value. |
| T2 | The type of the second possible value. |
| T3 | The type of the third possible value. |
Constructors
| Name | Description |
|---|
| OneOf(T1) | Initializes a new instance of the OneOf class with a value of type T1. |
| OneOf(T2) | Initializes a new instance of the OneOf class with a value of type T2. |
| OneOf(T3) | Initializes a new instance of the OneOf class with a value of type T3. |
Methods
| Name | Description |
|---|
| Match(Func<T1, TResult>, Func<T2, TResult>, Func<T3, TResult>) | Executes one of the provided functions based on the underlying type of the value. |
| implicit operator | (3 operators) |
See Also