# OrleansConstructorAttribute

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

[NuGet package](https://www.nuget.org/packages/Microsoft.Orleans.Serialization.Abstractions) | [Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.Abstractions/Annotations.cs#L293)

```csharp
[System.Obsolete(Use GeneratedActivatorConstructorAttribute instead. This attribute is not recognized by Orleans.)]
public sealed class OrleansConstructorAttribute : ActivatorUtilitiesConstructorAttribute
```

Specifies the constructor the serializer should use when creating new instances from serialized data.

## Remarks

At most one constructor can be annotated with this attribute. If multiple constructors are annotated, the presence of this attribute is ignored.

## See also

- `Microsoft.Extensions.DependencyInjection.ActivatorUtilitiesConstructorAttribute`

## Constructors

- [OrleansConstructorAttribute](/orleans/docs/api/csharp/microsoft.orleans.serialization.abstractions/orleans.orleansconstructorattribute/constructors/constructor-0e289a71/)
