title: How do I use the C#6 "Using static" feature?
body: <p>I'm having a look at a couple of the <a href="http://blogs.msdn.com/b/csharpfaq/archive/2014/11/20/new-features-in-c-6.aspx" rel="noreferrer">new features in</a> C# 6, specifically, 
  <em>"using static"</em>.</p>
  
  <blockquote>
    <p><em><strong>using static</strong> is a new kind of using clause that lets you import static members of types directly into scope.</em><br>
    <sub>(Bottom of the blog post)</sub></p>
  </blockquote>
  
  <p>The idea is as follows, according to a couple of tutorials I found,<br>
  Instead of:</p>
  
  <pre><code>using System;
  
  class Program 
  { 
      static void Main() 
      { 
          Console.WriteLine("Hello world!"); 
          Console.WriteLine("Another message"); 
      } 
  }
  </code></pre>
  
  <p>You can omit the repeated <code>Console</code> statement, using the new C# 6 feature of using static classes:</p>
  
  <pre><code>using System.Console;
  //           ^ `.Console` added.
  class Program 
  { 
      static void Main() 
      { 
          WriteLine("Hello world!"); 
          WriteLine("Another message"); 
      } // ^ `Console.` removed.
  }
  </code></pre>
  
  <p>However, this doesn't appear to be working for me. I'm getting an error on the <code>using</code> statement, saying:</p>
  
  <blockquote>
    <p><em>"A '<code>using namespace</code>' directive can only be applied to namespaces; '<code>Console</code>' is a type not a namespace. Consider a '<code>using static</code>' directive instead"</em></p>
  </blockquote>
  
  <p>I'm using visual studio 2015, and I have the build language version set to <em>"C# 6.0"</em></p>
  
  <p>What gives? Is the msdn blog's example incorrect? Why doesn't this work?</p>
  
  <hr>
  
  <p>The blog post has now been updated to reflect the latest updates, but here's a screenshot in case the blog goes down:</p>
  
  <blockquote>
    <p><a href="https://i.stack.imgur.com/by29I.png" rel="noreferrer"><img src="https://i.stack.imgur.com/by29Im.png" alt="blog"></a></p>
  </blockquote>