title: C# Extension Method Not Defined
body: <p>I have a really basic extension method:</p>
  
  <pre><code>namespace PHPImport
  {
      public static class StringExtensionMethods
      {
          public static bool IsNullEmptyOrWhiteSpace(this string theString)
          {
              string trimmed = theString.Trim();
  
              if (trimmed == "\0")
                  return true;
  
              if (theString != null)
              {
                  foreach (char c in theString)
                  {
                      if (Char.IsWhiteSpace(c) == false)
                          return false;
                  }
              }
  
              return true;
          }
      }
  }
  </code></pre>
  
  <p>I'm trying to use this in the same project (separate .cs file), in the same namespace, and I'm getting a <code>'string' does not contain a definition for 'IsNullEmptyOrWhiteSpace'</code> error.</p>
  
  <pre><code>namespace PHPImport
  {
      class AClassName: AnInterface
      {
          private void SomeMethod()
          {
               if (string.IsNullEmptyOrWhiteSpace(aStringObject)) { ... }
          }
      }
  }
  </code></pre>
  
  <p>I've tried rebuilding/cleaning the solution, and restarting visual studio to no avail.</p>
  
  <p>Any ideas?  </p>