[System.Runtime.Remoting.Contexts.Synchronization()]
public class Calc: ContextBoundObject
{
public Calc()
{
Console.WriteLine("Calc(): " + Thread.CurrentContext);
}
public int Add(int x, int y)
{
Console.WriteLine("Add: " + Thread.CurrentContext);
return x + y;
}
}
public class Application
{
public static void Main()
{
Console.WriteLine("Main: " + Thread.CurrentContext);
Assert.AreEqual(3, new Calc().Add(1, 2));
}
}