# PersistentStateAttribute Constructors

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

## PersistentStateAttribute(string, string) {#constructor-string-string-4fa2d185}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.persistentstateattribute/constructors/constructor-string-string-4fa2d185/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Facet/Persistent/PersistentStateAttribute.cs#L20-L25)

```csharp
public PersistentStateAttribute(string stateName, string storageName = null)
```

Initializes a new instance of the [PersistentStateAttribute](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.persistentstateattribute/) class.

### Parameters

- `stateName` (`string`): Name of the state.
- `storageName` (`string`): Name of the storage provider.
