Skip to content

fodyarchived/Immutable

Repository files navigation

Chat on Gitter NuGet Status

This is an add-in for Fody

Icon

Creates immutable types

See also Fody usage.

NuGet installation

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.

Your code

[Immutable]
public class Sample
{
    public string MyField = "Foo";
}

What gets compiled

public class Sample
{
    public readonly string MyField = "Foo";
}

What fields are targeted

  • For Types with the [Immutable] attribute.
  • All instance fields

Icon

Icon courtesy of The Noun Project

About

Creates immutable types

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages