public ClassWithTask(ClassWithTask obj) { System.Diagnostics.Debug.WriteLine("ClassWithTask.ClassWithTask(ClassWithTask obj) starting... (thread ID = {0})", Thread.CurrentThread.ManagedThreadId); P1 = obj.P1; _p2 = obj.P2; System.Diagnostics.Debug.WriteLine("ClassWithTask.ClassWithTask(ClassWithTask obj) finished"); }
static void Main(string[] args) { var classWithTask = new ClassWithTask(DateTime.Now); System.Diagnostics.Debug.WriteLine(classWithTask); }