Topic | Value |
---|---|
Id | GU0022 |
Severity | Hidden |
Enabled | True |
Category | Gu.Analyzers.Correctness |
Code | GU0022UseGetOnly |
Use get-only.
The property is only assigned in constructor or in property initializer and can be made get-only.
Use the code fix.
Configure the severity per project, for more info see MSDN.
#pragma warning disable GU0022 // Use get-only
Code violating the rule here
#pragma warning restore GU0022 // Use get-only
Or put this at the top of the file to disable all instances.
#pragma warning disable GU0022 // Use get-only
[System.Diagnostics.CodeAnalysis.SuppressMessage("Gu.Analyzers.Correctness",
"GU0022:Use get-only",
Justification = "Reason...")]