title: C# importing class into another class doesn't work
body: <p>I'm quite new to C#, and have made a class that I would like to use in my main class. These two classes are in different files, but when I try to import one into the other with <code>using</code>, cmd says says </p>
  
  <blockquote>
    <p>The type or namespace name "MyClass" could not be found (are you missing a using directive or an assembly reference?</p>
  </blockquote>
  
  <p>I know that in Java I have to mess around with <code>CLASSPATH</code> to get things like this to work, but I have no idea about C#.</p>
  
  <p>Additional details:</p>
  
  <p>As you've probably figured out, I'm compiling and executing via command prompt. I'm compiling my non-main class using <code>/target:library</code> (I heard that only main classes should be .exe-files).</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>public class MyClass {
      void stuff() {
  
      }
  }
  </code></pre>
  
  <p>and my main class:</p>
  
  <pre><code>using System;
  using MyClass;
  
  public class MyMainClass {
      static void Main() {
          MyClass test = new MyClass();
          /* Doesn't work */
      }
  }
  </code></pre>
  
  <p>I have tried to encompass my non-main class with <code>namespace MyNamespace { }</code> and importing that, but it doesn't work either.</p>