Get name of current AppDomain and context ID
using System;
using System.Threading;
class MainClass
{
// [MTAThread]
[STAThread]
static void Main(string[] args)
{
Thread primaryThread = Thread.CurrentThread;
primaryThread.Name = "ThePrimaryThread";
Console.WriteLine("Name of current AppDomain: {0}", Thread.GetDomain().FriendlyName);
Console.WriteLine("ID of current Context: {0}", Thread.CurrentContext.ContextID);
}
}
Output Name of current AppDomain: main.exe
ID of current Context: 0
|
HTML code for linking to this page:
Related in same category :
-
-
|