title: CA1821 Remove empty Finalizers
body: <p>Why VS complains about this finalizer?</p>
  
  <p>VS 2017 -- <code>15.3.5</code><br>
  Microsoft Code Analysis 2017 -- <code>2.3.0.62003</code></p>
  
  <pre><code>using System;
  
  namespace ConsoleApp
  {
      class DisposableClass : IDisposable
      {
  #if DEBUG
          ~DisposableClass() // CA1821 Remove empty Finalizers
          {
              System.Diagnostics.Debug.Fail("Forgot Dispose?");
          }
  #endif
  
          public void Dispose()
          {
  #if DEBUG
              GC.SuppressFinalize(this);
  #endif
          }
      }
  
      class Program
      {
          static void Main(string[] args)
          {
              Console.WriteLine("Hello World!");
          }
      }
  }
  </code></pre>