public class Test
{
public static void Main()
{
// ...Some code...
System.Console.WriteLine("Before");
new MyClass().DoSomething();
// ...Some other code...
System.Console.WriteLine("After");
}
}
public class MyClass
{
private int _myVar;
public void DoSomething()
{
// ...Do something...
_myVar = 1;
System.Console.WriteLine("Inside");
}
}
cHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCS8vIC4uLlNvbWUgY29kZS4uLgoJCVN5c3RlbS5Db25zb2xlLldyaXRlTGluZSgiQmVmb3JlIik7CgoJCW5ldyBNeUNsYXNzKCkuRG9Tb21ldGhpbmcoKTsKCgkJLy8gLi4uU29tZSBvdGhlciBjb2RlLi4uCgkJU3lzdGVtLkNvbnNvbGUuV3JpdGVMaW5lKCJBZnRlciIpOwoJfQp9CgpwdWJsaWMgY2xhc3MgTXlDbGFzcwp7Cglwcml2YXRlIGludCBfbXlWYXI7CgoJcHVibGljIHZvaWQgRG9Tb21ldGhpbmcoKQoJewoJCS8vIC4uLkRvIHNvbWV0aGluZy4uLgoKCQlfbXlWYXIgPSAxOwoKCQlTeXN0ZW0uQ29uc29sZS5Xcml0ZUxpbmUoIkluc2lkZSIpOwoJfQp9