# OpcStateMachineTransitionAttribute Members

> Reference: Defines an unique transition from one state to another state a custom OpcStateMachineNode can perform.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcStateMachineTransitionAttribute</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>
</dl>

Inherits members from [Attribute](https://learn.microsoft.com/dotnet/api/system.attribute).

## Constructors

### OpcStateMachineTransitionAttribute

<span class="api-meta">4 overloads</span>

| Overload | Description |
|---|---|
| [OpcStateMachineTransitionAttribute(object, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/members#opcstatemachinetransitionattribute-system-object-system-object) | Initializes a new instance of the [OpcStateMachineTransitionAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/) class using the `from` and `to` values of the transition to define. |
| [OpcStateMachineTransitionAttribute(uint, object, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/members#opcstatemachinetransitionattribute-system-uint32-system-object-system-object) | Initializes a new instance of the [OpcStateMachineTransitionAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/) class using the `number`, `from` and `to` of the transition to define. |
| [OpcStateMachineTransitionAttribute(uint, string, uint, string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/members#opcstatemachinetransitionattribute-system-uint32-system-string-system-uint32-system-string) | Initializes a new instance of the [OpcStateMachineTransitionAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/) class using the `from`, `fromName`, `to` and `toName` of the transition to define. |
| [OpcStateMachineTransitionAttribute(uint, uint, string, uint, string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/members#opcstatemachinetransitionattribute-system-uint32-system-uint32-system-string-system-uint32-system-string) | Initializes a new instance of the [OpcStateMachineTransitionAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/) class using the `number`, `from`, `fromName`, `to` and `toName` of the transition to define. |

#### OpcStateMachineTransitionAttribute(object, object)

Initializes a new instance of the [OpcStateMachineTransitionAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/) class using the `from` and `to` values of the transition to define.

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

```csharp
public OpcStateMachineTransitionAttribute(object from, object to)
```

</div>

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

```vbnet
Public Sub New(from As Object, [to] As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `from` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | A numerical or enumeration value which is used to uniquely identify the state 'from' which the transition begins. |
| `to` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | A numerical or enumeration value which is used to uniquely identify the state 'to' which the transition goes. |

#### OpcStateMachineTransitionAttribute(uint, object, object)

Initializes a new instance of the [OpcStateMachineTransitionAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/) class using the `number`, `from` and `to` of the transition to define.

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

```csharp
public OpcStateMachineTransitionAttribute(uint number, object from, object to)
```

</div>

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

```vbnet
Public Sub New(number As UInteger, from As Object, [to] As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `number` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | The unique number of the transition to define. |
| `from` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | A numerical or enumeration value which is used to uniquely identify the state 'from' which the transition begins. |
| `to` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | A numerical or enumeration value which is used to uniquely identify the state 'to' which the transition goes. |

#### OpcStateMachineTransitionAttribute(uint, string, uint, string)

Initializes a new instance of the [OpcStateMachineTransitionAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/) class using the `from`, `fromName`, `to` and `toName` of the transition to define.

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

```csharp
public OpcStateMachineTransitionAttribute(
    uint from,
    string fromName,
    uint to,
    string toName)
```

</div>

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

```vbnet
Public Sub New(
    from As UInteger,
    fromName As String,
    [to] As UInteger,
    toName As String)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `from` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | An [uint](https://learn.microsoft.com/dotnet/api/system.uint32) value which is used to uniquely identify the state 'from' which the transition begins. |
| `fromName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The unique name of the state 'from' which the transition begins. |
| `to` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | An [uint](https://learn.microsoft.com/dotnet/api/system.uint32) value which is used to uniquely identify the state 'to' which the transition goes. |
| `toName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The unique name of the state 'to' which the transition goes. |

#### OpcStateMachineTransitionAttribute(uint, uint, string, uint, string)

Initializes a new instance of the [OpcStateMachineTransitionAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/) class using the `number`, `from`, `fromName`, `to` and `toName` of the transition to define.

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

```csharp
public OpcStateMachineTransitionAttribute(
    uint number,
    uint from,
    string fromName,
    uint to,
    string toName)
```

</div>

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

```vbnet
Public Sub New(
    number As UInteger,
    from As UInteger,
    fromName As String,
    [to] As UInteger,
    toName As String)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `number` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | The unique number of the transition to define. |
| `from` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | An [uint](https://learn.microsoft.com/dotnet/api/system.uint32) value which is used to uniquely identify the state 'from' which the transition begins. |
| `fromName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The unique name of the state 'from' which the transition begins. |
| `to` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | An [uint](https://learn.microsoft.com/dotnet/api/system.uint32) value which is used to uniquely identify the state 'to' which the transition goes. |
| `toName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The unique name of the state 'to' which the transition goes. |

## Properties

### From

Gets a value uniquely identifying the state 'from' which the transition begins.

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

```csharp
public object From { get; }
```

</div>

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

```vbnet
Public ReadOnly Property From As Object
```

</div>

**Property value**

[Object](https://learn.microsoft.com/dotnet/api/system.object)

An [object](https://learn.microsoft.com/dotnet/api/system.object) representing a numerical or enumeration value which is used to uniquely identify the state used as the 'from' state of the transition.

### FromName

Gets the unique name of the [From](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/members#from) state.

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

```csharp
public string FromName { get; }
```

</div>

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

```vbnet
Public ReadOnly Property FromName As String
```

</div>

**Property value**

[String](https://learn.microsoft.com/dotnet/api/system.string)

A [string](https://learn.microsoft.com/dotnet/api/system.string) representing the unique name of the [From](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/members#from) state.

### Number

Gets the unique number of the transition to define.

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

```csharp
public uint? Number { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Number As UInteger?
```

</div>

**Property value**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[UInt32](https://learn.microsoft.com/dotnet/api/system.uint32)&gt;

An [uint](https://learn.microsoft.com/dotnet/api/system.uint32) used to define the unique number of the transition or a null reference (Nothing in Visual Basic); if the transition is to be numbered in sequence.

### To

Gets a value uniquely identifying the state 'to' which the transition goes.

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

```csharp
public object To { get; }
```

</div>

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

```vbnet
Public ReadOnly Property [To] As Object
```

</div>

**Property value**

[Object](https://learn.microsoft.com/dotnet/api/system.object)

An [object](https://learn.microsoft.com/dotnet/api/system.object) representing a numerical or enumeration value which is used to uniquely identify the state used as the 'to' state of the transition.

### ToName

Gets the unique name of the [To](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/members#to) state.

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

```csharp
public string ToName { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ToName As String
```

</div>

**Property value**

[String](https://learn.microsoft.com/dotnet/api/system.string)

A [string](https://learn.microsoft.com/dotnet/api/system.string) representing the unique name of the [To](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatemachinetransitionattribute/members#to) state.
