# OpcEncodingStackTrace Members

> Reference: Represents a stack trace of an encoder / decoder, which is an ordered collection of one or more stack frames.

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

### Empty

<span class="api-meta">static</span>

Gets a [OpcEncodingStackTrace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingstacktrace/) with a [FrameCount](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingstacktrace/members#framecount) equals zero.

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

```csharp
public static OpcEncodingStackTrace Empty { get; }
```

</div>

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

```vbnet
Public Shared ReadOnly Property Empty As OpcEncodingStackTrace
```

</div>

**Property value**

[OpcEncodingStackTrace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingstacktrace/)

An instance of the [OpcEncodingStackTrace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingstacktrace/) without any stack frames.

### FrameCount

Gets the number of frames in the stack trace.

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

```csharp
public int FrameCount { get; }
```

</div>

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

```vbnet
Public ReadOnly Property FrameCount As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The number of frames in the stack trace.

### IsEmpty

Gets a value indicating whether the stack trace is empty.

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

```csharp
public bool IsEmpty { get; }
```

</div>

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

```vbnet
Public ReadOnly Property IsEmpty As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if [FrameCount](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingstacktrace/members#framecount) is equals zero; otherwise the value false.

### IsEnabled

<span class="api-meta">static</span>

Gets or sets a value indicating whether encoders / decoders shall build a stack trace of the operations performed. The default value is false. In case there tracing of the encode / decode operations is enabled the overall performance of the encoders / decoders used slows down.

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

```csharp
public static bool IsEnabled { get; set; }
```

</div>

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

```vbnet
Public Shared Property IsEnabled As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if encoders / decoders shall build a stack trace; otherwise the value false.

## Methods

### GetFrame

Gets the specified stack frame.

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

```csharp
public OpcEncodingStackFrame GetFrame(int index)
```

</div>

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

```vbnet
Public Function GetFrame(index As Integer) As OpcEncodingStackFrame
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `index` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the stack frame requested. |

**Returns**

[OpcEncodingStackFrame](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingstackframe/)

The specified stack frame as an instance of the [OpcEncodingStackFrame](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingstackframe/) class or a null reference (Nothing in Visual Basic) in case there `index` is outside of the bounds of the frames in the current [OpcEncodingStackTrace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingstacktrace/).

### GetFrames

Returns a copy of all stack frames in the current stack trace.

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

```csharp
public OpcEncodingStackFrame[] GetFrames()
```

</div>

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

```vbnet
Public Function GetFrames() As OpcEncodingStackFrame()
```

</div>

**Returns**

[OpcEncodingStackFrame](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingstackframe/)[]

An array of the type [OpcEncodingStackFrame](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingstackframe/) representing the encoding / decoding operations in the stack trace.

### ToString

<span class="api-meta">override</span>

Returns a readable representation of the stack trace.

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

```csharp
public override string ToString()
```

</div>

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

```vbnet
Public Overrides Function ToString() As String
```

</div>

**Returns**

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

A [string](https://learn.microsoft.com/dotnet/api/system.string) representing the information of the current [OpcEncodingStackTrace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcencodingstacktrace/) in a readable way.

**Overrides**

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