# OpcServiceResponse&lt;T&gt; Members

> Reference: Defines the base class of the responses of the services of OPC UA which provide their results as a T.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcServiceResponse&lt;T&gt;</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.services">Opc.UaFx.Services</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>

Inherits members from [OpcServiceResponse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse/members).

## Constructors

### OpcServiceResponse

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

| Overload | Description |
|---|---|
| [OpcServiceResponse()](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse-1/members#opcserviceresponse-noparams)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcServiceResponse&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse-1/) class using a new header and no results. |
| [OpcServiceResponse(IOpcServiceResponseHeader)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse-1/members#opcserviceresponse-opc-uafx-services-iopcserviceresponseheader)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcServiceResponse&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse-1/) class using the specified `header`, no results and no diagnostic information. |
| [OpcServiceResponse(IOpcServiceResponseHeader, DiagnosticInfoCollection)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse-1/members#opcserviceresponse-opc-uafx-services-iopcserviceresponseheader-opc-ua-diagnosticinfocollection)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcServiceResponse&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse-1/) class using the specified `header` and `diagnosticInfos` and no results. |
| [OpcServiceResponse(IOpcServiceResponseHeader, T, DiagnosticInfoCollection)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse-1/members#opcserviceresponse-opc-uafx-services-iopcserviceresponseheader-t0-opc-ua-diagnosticinfocollection)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcServiceResponse&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse-1/) class using the specified `header`, `results` and `diagnosticInfos`. |

#### OpcServiceResponse()

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

Initializes a new instance of the [OpcServiceResponse&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse-1/) class using a new header and no results.

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

```csharp
protected OpcServiceResponse()
```

</div>

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

```vbnet
Protected Sub New()
```

</div>

#### OpcServiceResponse(IOpcServiceResponseHeader)

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

Initializes a new instance of the [OpcServiceResponse&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse-1/) class using the specified `header`, no results and no diagnostic information.

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

```csharp
protected OpcServiceResponse(IOpcServiceResponseHeader header)
```

</div>

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

```vbnet
Protected Sub New(header As IOpcServiceResponseHeader)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `header` | [IOpcServiceResponseHeader](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcserviceresponseheader/) | The header of the response. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `header` is a null reference (Nothing in Visual Basic). |

#### OpcServiceResponse(IOpcServiceResponseHeader, DiagnosticInfoCollection)

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

Initializes a new instance of the [OpcServiceResponse&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse-1/) class using the specified `header` and `diagnosticInfos` and no results.

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

```csharp
protected OpcServiceResponse(
    IOpcServiceResponseHeader header,
    DiagnosticInfoCollection diagnosticInfos)
```

</div>

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

```vbnet
Protected Sub New(
    header As IOpcServiceResponseHeader,
    diagnosticInfos As DiagnosticInfoCollection)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `header` | [IOpcServiceResponseHeader](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcserviceresponseheader/) | The header of the response. |
| `diagnosticInfos` | <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.DiagnosticInfoCollection">DiagnosticInfoCollection</abbr> | The diagnostic information of the operations of the service, or a null reference (Nothing in Visual Basic) for none. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `header` is a null reference (Nothing in Visual Basic). |

#### OpcServiceResponse(IOpcServiceResponseHeader, T, DiagnosticInfoCollection)

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

Initializes a new instance of the [OpcServiceResponse&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse-1/) class using the specified `header`, `results` and `diagnosticInfos`.

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

```csharp
protected OpcServiceResponse(
    IOpcServiceResponseHeader header,
    T results,
    DiagnosticInfoCollection diagnosticInfos)
```

</div>

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

```vbnet
Protected Sub New(
    header As IOpcServiceResponseHeader,
    results As T,
    diagnosticInfos As DiagnosticInfoCollection)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `header` | [IOpcServiceResponseHeader](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcserviceresponseheader/) | The header of the response. |
| `results` | T | The results of the operations of the service, or a null reference (Nothing in Visual Basic) for none. |
| `diagnosticInfos` | <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.DiagnosticInfoCollection">DiagnosticInfoCollection</abbr> | The diagnostic information of the operations of the service, or a null reference (Nothing in Visual Basic) for none. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `header` is a null reference (Nothing in Visual Basic). |

## Properties

### Results

Gets the results of the operations of the service.

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

```csharp
public T Results { get; protected set; }
```

</div>

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

```vbnet
Public Property Results As T
```

</div>

**Property value**

T

The `T` which contains the results of the operations.
