# ReadOnlyAttribute

Package: [Microsoft.Orleans.Core.Abstractions](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/) 10.0.0

[NuGet package](https://www.nuget.org/packages/Microsoft.Orleans.Core.Abstractions)

```csharp
public sealed class ReadOnlyAttribute : Attribute
```

The ReadOnly attribute is used to mark methods that do not modify the state of a grain. 

Marking methods as ReadOnly allows the run-time system to perform a number of optimizations that may significantly improve the performance of your application.

## Constructors

- [ReadOnlyAttribute](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.concurrency.readonlyattribute/constructors/constructor-452e2b01/)
