This is an add-in for Fody
Creates immutable types
See also Fody usage.
Install the Immutable.Fody NuGet package and update the Fody NuGet package:
PM> Install-Package Fody
PM> Install-Package Immutable.Fody
The Install-Package Fody
is required since NuGet always defaults to the oldest, and most buggy, version of any dependency.
[Immutable]
public class Sample
{
public string MyField = "Foo";
}
public class Sample
{
public readonly string MyField = "Foo";
}
- For Types with the
[Immutable]
attribute. - All instance fields
Icon courtesy of The Noun Project