OneOfT1T2 Class
OneOf<T1,T2> class
Represents a value that can be one of two distinct types, T1 or T2.
public class OneOf<T1, T2>
| Parameter | Description |
|---|
| T1 | The type of the first possible value. |
| T2 | The type of the second 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. |
Methods
| Name | Description |
|---|
| Match(Func<T1, TResult>, Func<T2, TResult>) | Executes one of the provided functions based on the underlying type of the value. |
| implicit operator | (2 operators) |
See Also