title: Abstract class cannot be sealed in c#?
body: <p>I read somewhere </p>
  
  <p><strong>"Abstract and Sealed modifiers are equivalent to a class which is static"</strong> </p>
  
  <p>I also found that</p>
  
  <p><strong>"When you declare a static class, internally the compiler marks the class abstract and sealed, and creates a private constructor in the IL code"</strong></p>
  
  <p>so, I decided to do this:</p>
  
  <pre><code>static class A
  {
      public static void test()
      {
          Console.WriteLine("test");
      }
  }
  </code></pre>
  
  <p><strong>Now, the class "A" cannot be inherited nor instantiated.</strong></p>
  
  <p><strong>So, let us write a <code>class B</code> using <code>abstract</code> to prevent instantiation and using <code>sealed</code> to prevent inheritance.</strong> </p>
  
  <p>But, this approach fails.</p>
  
  <p>which should be equivalent to</p>
  
  <pre><code>public abstract sealed class B
  {
      private B()
      {
  
      }
      public void test()
      {
          Console.WriteLine("test");
      }
  }
  </code></pre>
  
  <p><code>But I recieve an error stating "error CS0418:</code>B': an abstract class cannot be sealed or static"` . Any ideas why this is not possible ?</p>
  
  <p>Thanks in advance for your answers.</p>