Topic | Value |
---|---|
Id | IDISP018 |
Severity | Warning |
Enabled | True |
Category | IDisposableAnalyzers.Correctness |
Code | DisposeMethodAnalyzer |
Call SuppressFinalize(this) as the type has a finalizer.
Call GC.SuppressFinalize(this)
if the type has a finalizer.
Use the code fix.
Configure the severity per project, for more info see MSDN.
#pragma warning disable IDISP018 // Call SuppressFinalize
Code violating the rule here
#pragma warning restore IDISP018 // Call SuppressFinalize
Or put this at the top of the file to disable all instances.
#pragma warning disable IDISP018 // Call SuppressFinalize
[System.Diagnostics.CodeAnalysis.SuppressMessage("IDisposableAnalyzers.Correctness",
"IDISP018:Call SuppressFinalize",
Justification = "Reason...")]