# GrainState&lt;T&gt;.State

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.grainstate-1/) | [Properties](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.grainstate-1/properties/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Core/CodeGeneration/IGrainState.cs)

```csharp
[Orleans.Id(0)]
public T? State
```

Gets or sets the state.
