title: C# Project & Namespaces Question
body: <p>I am creating a little Math library for myself contained within a single project and am running into some issues with namespaces. I have the project <code>MyMathLib</code> and the top level namespace:</p>
  
  <pre><code>namespace MyMathLib
  { ... }
  </code></pre>
  
  <p>and in a separate file...</p>
  
  <pre><code>namespace MyMathLib.Addition
  { ... }
  </code></pre>
  
  <p>and...</p>
  
  <pre><code>namespace MyMathLib.Subtraction
  { ... }
  </code></pre>
  
  <p>In the <code>MyMathLib.Subtraction</code> namespace I have a method that needs to use a static method <code>SomeClass.Work()</code> defined in <code>MyMathLib.Addition</code> so I included <code>using MyMathLib.Addition</code> at the beginning of the Subtraction file. But when I try to use the method it would like me to first qualify it with <code>Addition.SomeClass.Work()</code> and I want to be able to just type <code>SomeClass.Work()</code>. What am I doing wrong?</p>
  
  <p>Thanks!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Thanks for the suggestions! In each file, I actually named the class after the namespace (i.e. in the namespace <code>MyMathLib.Addition</code> is a static class <code>Addition</code> and in <code>MyMathLib.Subtraction</code> there is a static class <code>Subtraction</code>). Apparently this is what caused the issue (looking back, I should have stated this instead of using <code>SomeClass</code>). If I change the namespace to <code>MyMathLib.MyAddition</code> while keeping the static class as <code>Addition</code>, the <code>using MyMathLib.MyAddition</code> works as I want; that is, I can now just type <code>Addition.Work()</code> in my static <code>Subtraction</code> class. I've seen classes named the same as it's containing namespace before, could someone maybe explain why this is causing an issue? Shouldn't the compiler be able to determine whether I want to use the namespace or the class from the context of the code?   </p>