# TargetHolderExtensions Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.runtime.targetholderextensions/)

## GetComponent(ITargetHolder) {#getcomponent-1-this-orleans-serialization-invocation-itargetholder-eeafd3e3}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.runtime.targetholderextensions/methods/getcomponent-1-this-orleans-serialization-invocation-itargetholder-eeafd3e3/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Invocation/TargetHolderExtensions.cs#L15)

```csharp
public static TComponent? GetComponent<TComponent>(this ITargetHolder targetHolder)
```

Gets the component with the specified type.

### Parameters

- `targetHolder` (`ITargetHolder`): The target holder from which to retrieve the component.

### Returns

The component with the specified type.
