title: Does C# 4 optimize away namespaces in a manner that previous C# versions did not?
body: <p>This question is for interest sake.  I'm working with a third-party library and came across the following documentation on a <code>CMS.Security.Dummy</code> class: </p>
  
  <blockquote>
    <p>DO NOT DELETE THIS CLASS - This class prevents the compiler from
    dropping entire namespace under .NET 4.0.</p>
  </blockquote>
  
  <p>Does anybody know, or can anybody speculate why .NET 4 would drop the namespace if the dummy class were removed?  </p>
  
  <p>Because .NET 4 is explicitly named in the source code comment, I assume previous C# versions exhibit behaviour that do not require this dummy class. That's purely speculative though. </p>
  
  <p><strong>Screen shot</strong></p>
  
  <p><img src="https://i.stack.imgur.com/fxmiE.jpg" alt="documentation"></p>
  
  <p><strong>Decompiled Source Code</strong> </p>
  
  <pre><code>#region Assembly CMS.SettingsProvider.dll, v4.0.30319
  // ...\solution\wwwroot\Bin\CMS.SettingsProvider.dll
  #endregion
  
  using System;
  
  namespace CMS.Security
  {
      // Summary:
      //     DO NOT DELETE THIS CLASS - This class prevents the compiler from dropping
      //     entire namespace under .NET 4.0.
      public class Dummy
      {
          // Summary:
          //     DO NOT DELETE THIS CLASS - This class prevents the compiler from dropping
          //     entire namespace under .NET 4.0.
          public Dummy();
      }
  }
  </code></pre>