📄 class1.cs
字号:
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");
// Comment out this next line for the 2nd Example
secondDomain.ExecuteAssembly("AssemblyA.exe");
// Uncomment the next block, and comment out the above line to run the 2nd Example
/*
secondDomain.CreateInstance("AssemblyA",
"Wrox.ProCSharp.Assemblies.AppDomains.Class1", true,
System.Reflection.BindingFlags.CreateInstance,
null, new object[] {7, 3}, null, null, null);
*/
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -