AppDomain.CurrentDomain
using System; class MainClass { public static void Main(string[] args) { if (AppDomain.CurrentDomain.FriendlyName != "NewAppDomain") { AppDomain domain = AppDomain.CreateDomain("NewAppDomain"); domain.ExecuteAssembly("MainClass.exe", null, args); } foreach (string s in args) { Console.WriteLine(AppDomain.CurrentDomain.FriendlyName + " : " + s); } } }