Contextual info : Context « Development « C# / CSharp Tutorial






using System;
using System.Runtime.Remoting.Contexts;
using System.Threading;

class MainClass
{
  static void Main(string[] args)
  {
    Context ctx = Thread.CurrentContext;
    Console.WriteLine("Info about context {0}", ctx.ContextID);

    foreach(IContextProperty itfCtxProp in ctx.ContextProperties)
      Console.WriteLine("-> Ctx Prop: {0}", itfCtxProp.Name);
  }
}
Info about context 0
-> Ctx Prop: LeaseLifeTimeServiceProperty








14.22.Context
14.22.1.Contextual info
14.22.2.Contextual information: ContextBoundObject
14.22.3.Get name of current AppDomain and context ID