title: How do properly set up my common C# code so I can access them with a using directive?
body: <p>I want to be able organize my most common code elements so that they can be "included" with a using statement similar to</p>
  
  <pre><code>using System;
  using System.IO;
  </code></pre>
  
  <p>I am able to do this to a certain extent, but because of C# rules about namespaces and classes, I am unable to access my stuff directly, I always have to add it to a class and then access it by .item.</p>
  
  <p>For example if I make a C# file named MyStuff.cs as follows:</p>
  
  <pre><code>namespace MyStuff
  {
    public static class MyClass
    {
        public static int MyCode(...)
        {
            ...
        }
    }
  }
  </code></pre>
  
  <p>I have to use it in my other code like this:</p>
  
  <pre><code>using MyStuff
  ...
  
      int result = MyClass.MyCode(...);
  ...
  </code></pre>
  
  <p>I would like to be able to just access it like this (without the MyClass):</p>
  
  <pre><code>using MyStuff
  ...
  
      int result = MyCode(...);
  ...
  </code></pre>
  
  <p>But I can't get that to work.  I read somewhere that adding the "static" to the class they are in then the dot notation would not be needed, but that does not appear to be true.</p>
  
  <p>Can anybody explain how to do this, or am I stuck with the extra layer?</p>
  
  <p>Thanks!</p>