# Struct OneOf OptimaJet.Workflow.Core.Utils.OneOf.OneOf Namespace: [OptimaJet.Workflow.Core.Utils.OneOf](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Utils.OneOf/) ```csharp public readonly struct OneOf : IOneOf ``` ## Type Hierarchy - OneOf Current type - Implemented interfaces - [IOneOf](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Utils.OneOf/IOneOf/) ## Properties `public object Value { get; }` `public int Index { get; }` `public bool IsT0 { get; }` `public bool IsT1 { get; }` `public T0 AsT0 { get; }` `public T1 AsT1 { get; }` ## Methods `public static implicit operator OneOf(T0 t)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `t` | `{T0}` | | ### Returns | Type | Description | | --- | --- | | `OneOf` | | `public static implicit operator OneOf(T1 t)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `t` | `{T1}` | | ### Returns | Type | Description | | --- | --- | | `OneOf` | | `public void Switch(Action f0, Action f1)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `f0` | `Action` | | | `f1` | `Action` | | `public TResult Match(Func f0, Func f1)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `f0` | `Func` | | | `f1` | `Func` | | ### Returns | Type | Description | | --- | --- | | `{TResult}` | | `public static OneOf FromT0(T0 input)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `input` | `{T0}` | | ### Returns | Type | Description | | --- | --- | | `OneOf` | | `public static OneOf FromT1(T1 input)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `input` | `{T1}` | | ### Returns | Type | Description | | --- | --- | | `OneOf` | | `public OneOf MapT0(Func mapFunc)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `mapFunc` | `Func` | | ### Returns | Type | Description | | --- | --- | | `OneOf` | | `public OneOf MapT1(Func mapFunc)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `mapFunc` | `Func` | | ### Returns | Type | Description | | --- | --- | | `OneOf` | | `public bool TryPickT0(out T0 value, out T1 remainder)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `value` | `{T0}` | | | `remainder` | `{T1}` | | ### Returns | Type | Description | | --- | --- | | `Boolean` | | `public bool TryPickT1(out T1 value, out T0 remainder)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `value` | `{T1}` | | | `remainder` | `{T0}` | | ### Returns | Type | Description | | --- | --- | | `Boolean` | | `public override bool Equals(object obj)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `obj` | `Object` | | ### Returns | Type | Description | | --- | --- | | `Boolean` | | `public override string ToString()` ### Returns | Type | Description | | --- | --- | | `String` | | `public override int GetHashCode()` ### Returns | Type | Description | | --- | --- | | `Int32` | | [Previous OneOf](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Utils.OneOf/OneOf-T0-T1-T2/) [Next OneOfBase](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Utils.OneOf/OneOfBase-T0-T1-T2/)