title: Remove an assembly from an application domain
body: <p>So I'm trying to remove an assembly from my 
  <code>Thread.GetDomain().GetAssemblies()</code>
  area.</p>
  
  <p>I've looked at a couple of explanations on the web so far but have just not been able to figure it out.</p>
  
  <p>This is what I've gotten so far</p>
  
  <pre><code>AppDomain tempD = Thread.GetDomain();
  tempD.DoCallBack(LoaderCallback);
  AppDomain.Unload(tempD);
  System.IO.File.Delete(assemblyName);
  
  private static void LoaderCallback()
  {
       Assembly.ReflectionOnlyLoad("myAssembly");
  
       //byte[] raw = System.IO.File.ReadAllBytes(test);
       //Assembly yacsi = Assembly.Load(raw);
       //((IScript)yacsi.CreateInstance("Script")).Go();
  }
  </code></pre>
  
  <p>I've played around with this concept so far but I'm struggling to make the connection because  <code>Thread.GetDomain();</code> does not contain the <code>Unload</code> command</p>
  
  <p>Also I wasn't able to try this part <code>((IScript)yacsi.CreateInstance("Script")).Go()</code> because I don't know what assembly IScript is nor what to place in the  "Script" text section</p>
  
  <p>Any ideas will be appreciated</p>