# GrainState&lt;T&gt; Constructors

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

## GrainState&lt;T&gt; {#constructor-bae3d0e7}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.grainstate-1/constructors/constructor-bae3d0e7/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core/CodeGeneration/IGrainState.cs#L51-L53)

```csharp
public GrainState()
```

Initializes a new instance of the `Orleans.GrainState-1` class.

## GrainState&lt;T&gt;(T) {#constructor-t-04285c34}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.grainstate-1/constructors/constructor-t-04285c34/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core/CodeGeneration/IGrainState.cs#L61-L63)

```csharp
public GrainState(T state)
```

Initializes a new instance of the `Orleans.GrainState-1` class.

### Parameters

- `state` (`T`): The initial value of the state.

## GrainState&lt;T&gt;(T, string) {#constructor-t-string-4ba75718}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.grainstate-1/constructors/constructor-t-string-4ba75718/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core/CodeGeneration/IGrainState.cs#L74-L78)

```csharp
public GrainState(T state, string eTag)
```

Initializes a new instance of the `Orleans.GrainState-1` class.

### Parameters

- `state` (`T`): The initial value of the state.
- `eTag` (`string`): The initial e-tag value that allows optimistic concurrency checks at the storage provider level.
