Topic | Value |
---|---|
Id | GU0024 |
Severity | Info |
Enabled | True |
Category | Gu.Analyzers.Correctness |
Code | ClassDeclarationAnalyzer |
Seal type with default member.
When doing SomeType.Default
the expectation is to get an instance of type SomeType
.
Use the code fix.
Configure the severity per project, for more info see MSDN.
#pragma warning disable GU0024 // Seal type with default member
Code violating the rule here
#pragma warning restore GU0024 // Seal type with default member
Or put this at the top of the file to disable all instances.
#pragma warning disable GU0024 // Seal type with default member
[System.Diagnostics.CodeAnalysis.SuppressMessage("Gu.Analyzers.Correctness",
"GU0024:Seal type with default member",
Justification = "Reason...")]