title: Using an extension method defined in nested class
body: <p>Consider the following code:</p>
  
  <pre><code>1. namespace MyNS {
  2.   // A class
  3.   public class MyClass {
  4.     public string Do() {
  5.       return string.Blank();
  6.     }
  7.     // A nested type
  8.     protected static class Helper {
  9.       public static string Blank(this string str) {
  10         return String.Empty;
  11.       }
  12.     }
  13.   }
  14. } /* namespace */
  </code></pre>
  
  <p>However line 5 will cause the program not to compile. I know that in order to use extension methods a static class must be created and its enclosing namespace referenced through <code>using</code> directives.</p>
  
  <p>How to achieve this when the static class is a nested class?</p>