Class1.cs
上传用户:lxycoco
上传日期:2022-07-21
资源大小:38457k
文件大小:1k
- using System;
- namespace Wrox.ProCSharp.Assemblies.AppDomains
- {
- class Test
- {
- [STAThread]
- static void Main(string[] args)
- {
- AppDomain currentDomain = AppDomain.CurrentDomain;
- Console.WriteLine(currentDomain.FriendlyName);
- AppDomain secondDomain =
- AppDomain.CreateDomain("New AppDomain");
- // secondDomain.ExecuteAssembly("AssemblyA.exe");
- secondDomain.CreateInstance("AssemblyA",
- "Wrox.ProCSharp.Assemblies.AppDomains.Class1", true,
- System.Reflection.BindingFlags.CreateInstance,
- null, new object[] {7, 3}, null, null, null);
- }
- }
- }