title: Pass and execute delegate in separate AppDomain
body: <p>I want to exceute some piece of code in separate AppDomain with delegate. How can I do this?</p>
  
  <p><strong>UPD1</strong>: some more details about my problem
  My program processing some data (one iteration is: get some data from DB, evaluate it and create assemblies at runtime, execute dynamic assemblies and write results to DB). </p>
  
  <p>Current solution: each iteration running in separate thread.
  Better solution: each iteration running in separate AppDomain (to unload dynamic asseblies).</p>
  
  <p><strong>UPD2</strong>: All, thanks for answers. </p>
  
  <p>I have found one for me in this thread:
  <a href="https://stackoverflow.com/questions/1510466/replacing-process-start-with-appdomains">Replacing Process.Start with AppDomains</a></p>