# PersistentStateAttribute.PersistentStateAttribute(string, string?)

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

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Orleans.Runtime/Facet/Persistent/PersistentStateAttribute.cs#L19-L24)

```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.
