A static field is considered as immutable if it is private and if it is only assigned by the static constructor. An instance field is considered as immutable if it is private and if it is only assigned by its type’s constructor(s) or its type’s static constructor. Fields with a true value for IsLiteral, IsEnumValue or ICodeElement.IsThirdParty are never considered as immutable to avoid noise in the search for immutable fields. A field with a true value for IsInitOnly is always considered as immutable. In addition, a field with a true value for IsImmutable can be safely marked as readonly.
Requirements
Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed