标签:list() rom llb task for ram get color nbsp
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp6 { class Program { static string greetings = "PONG!"; static void Main(string[] args) { AppDomain otherDomain = AppDomain.CreateDomain("otherDomain"); greetings = "PING!"; MyCallBack(); otherDomain.DoCallBack(new CrossAppDomainDelegate(MyCallBack)); // Output: // PING! from defaultDomain // PONG! from otherDomain Console.In.ReadLine(); } public static void MyCallBack() { string name = AppDomain.CurrentDomain.FriendlyName; if (name == AppDomain.CurrentDomain.SetupInformation.ApplicationName) { name = "defaultDomain"; } Console.WriteLine(greetings + " from " + name); var list = AppDomain.CurrentDomain.GetAssemblies().ToList(); } } }
result:
PING! from defaultDomain PONG! from otherDomain
标签:list() rom llb task for ram get color nbsp
原文地址:https://www.cnblogs.com/nanfei/p/10888078.html