Topic | Value |
---|---|
Id | GU0070 |
Severity | Warning |
Enabled | True |
Category | Gu.Analyzers.Correctness |
Code | GU0070DefaultConstructedValueTypeWithNoUsefulDefault |
Types declared with struct must have a default constructor, even if there is no semantically sensible default value for that type. Examples include System.Guid and System.DateTime.
ADD MOTIVATION HERE
ADD HOW TO FIX VIOLATIONS HERE
Configure the severity per project, for more info see MSDN.
#pragma warning disable GU0070 // Default-constructed value type with no useful default
Code violating the rule here
#pragma warning restore GU0070 // Default-constructed value type with no useful default
Or put this at the top of the file to disable all instances.
#pragma warning disable GU0070 // Default-constructed value type with no useful default
[System.Diagnostics.CodeAnalysis.SuppressMessage("Gu.Analyzers.Correctness",
"GU0070:Default-constructed value type with no useful default",
Justification = "Reason...")]