# Class OneOfBase OptimaJet.Workflow.Core.Utils.OneOf.OneOfBase Namespace: [OptimaJet.Workflow.Core.Utils.OneOf](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Utils.OneOf/) ```csharp public class OneOfBase : IOneOf ``` ## Type Hierarchy - OneOfBase Current type - [ExecuteFormResult](https://api.workflowengine.io/forms-plugin/OptimaJet.Workflow.Plugins.FormsPlugin/ExecuteFormResult/) - [SaveFormResult](https://api.workflowengine.io/forms-plugin/OptimaJet.Workflow.Plugins.FormsPlugin/SaveFormResult/) - Implemented interfaces - [IOneOf](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Utils.OneOf/IOneOf/) ## Constructors `protected OneOfBase(OneOf input)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `input` | `OneOf` | | ## Properties `public object Value { get; }` `public int Index { get; }` `public bool IsT0 { get; }` `public bool IsT1 { get; }` `public bool IsT2 { get; }` `public T0 AsT0 { get; }` `public T1 AsT1 { get; }` `public T2 AsT2 { get; }` ## Methods `public void Switch(Action f0, Action f1, Action f2)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `f0` | `Action` | | | `f1` | `Action` | | | `f2` | `Action` | | `public TResult Match(Func f0, Func f1, Func f2)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `f0` | `Func` | | | `f1` | `Func` | | | `f2` | `Func` | | ### Returns | Type | Description | | --- | --- | | `{TResult}` | | `public bool TryPickT0(out T0 value, out OneOf remainder)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `value` | `{T0}` | | | `remainder` | `OneOf` | | ### Returns | Type | Description | | --- | --- | | `Boolean` | | `public bool TryPickT1(out T1 value, out OneOf remainder)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `value` | `{T1}` | | | `remainder` | `OneOf` | | ### Returns | Type | Description | | --- | --- | | `Boolean` | | `public bool TryPickT2(out T2 value, out OneOf remainder)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `value` | `{T2}` | | | `remainder` | `OneOf` | | ### 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/) [Next OneOfBase](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Utils.OneOf/OneOfBase-T0-T1/)