# SystemTarget.SetComponent(TComponent?)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.systemtarget/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.systemtarget/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Core/SystemTarget.cs#L134-L146)

```csharp
public void SetComponent<TComponent>(TComponent? instance)
```

Sets the provided value as the component for type `TComponent`.

### Parameters

- `instance` (`TComponent?`): The component instance.
