public void Method() { using (MyObject my = new MyObject()) { my.DoSomething(); string msg = "hello"; msg += " My name"; msg += " is Alex"; Console.WriteLine(msg); } }
public static void DoSomething() { CallTracer.Start(System.Reflection.MethodBase.GetCurrentMethod()); MyObject obj = new MyObject(); obj.DoSomething(-1); try { obj.DoSomethingAssert(-1); } catch (Exception except) { CallTracer.Output(except.Message); ; } CallTracer.End(); }