Can we dynamically swap assemblies at run-time in C#
<p>Consider following code -</p>

<pre><code>namespace N1
{
    class A
    {
        //some implementation
    }
    class B
    {
        //some implemntation
    }
}

namespace N2
{
    class A
    {
        //slightly different implementation
    }
    class B
    {
        //slightly different implementation
    }    
}
</code></pre>

<p>Obviously we can't use both assemblies together -</p>

<p>And the resolution is, to use fully qualified class names. When refactoring 1000s of lines of code which uses N1 namespace classes. Decision is made once at the startup of process, whethere N1 has to be used or N2.</p>

<p>Something a bit more advanced than conditional compilation feature in C++</p>

<pre><code>#ifdef debug
#include &lt;N1.h&gt;
#elif
#include &lt;N2.h&gt;
#endif
</code></pre>

<p>Sorry if it sounds impossible, but out of my curiosity I wonder is it possible to do -</p>

<pre><code>if (...)
    {
        using N1; 
    }
else
    {
        using N2;
    }
</code></pre>
