# IOpcUnion Members

> Reference: Defines that the implementing data type is to be treat like unions.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">IOpcUnion</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

## Properties

### SwitchValue

Gets or sets the switch value which is evaluated during encoding and decoding of this structure to decide which field is to be decoded or encoded. The value zero defines no property is to be encoded nor decoded. Therefore the first property in the union is transported if this property is equals to the value one (1), the second property if this property is equals to the value two (2) and so on.

<div class="api-signature" data-lang="csharp">

```csharp
uint SwitchValue { get; set; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
<CLSCompliant(False)>
Property SwitchValue As UInteger
```

</div>

**Property value**

[UInt32](https://learn.microsoft.com/dotnet/api/system.uint32)

The switch value which is evaluated to decide which property of the union is to be encoded or decoded. The default value is zero (0). If zero (0) no property is encoded nor decoded. To encode/decode the first property this property needs to be set to the value one (1), to encode/decode the second property this property needs to be set to the value two (2) and so on.
