void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); }
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); }
main void method2() { Console.WriteLine(“Method 2 was called”); } Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } main 1 2 method2(); method1();
main void method2() { Console.WriteLine(“Method 2 was called”); } Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } main 1 2 method2(); method1();
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } method2 main 1 2 method2(); method1();
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } method2 1 Console.WriteLine(“Method…”); main 1 2 method2(); method1();
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } Output Method 2 was called method2 1 Console.WriteLine(“Method…”); main 1 2 method2(); method1();
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } Output Method 2 was called method2 1 Console.WriteLine(“Method…”); main 1 2 method2(); method1();
main void method2() { Console.WriteLine(“Method 2 was called”); } Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } Output Method 2 was called main 1 2 method2(); // Finished! method1();
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } Output 1 2 3 Console.WriteLine(“Method…”); method2(); Method 2 was called method1 main 1 2 method2(); // Finished! method1();
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } Output 1 2 3 Console.WriteLine(“Method…”); method2(); Method 2 was called method1 Method 1 was called main 1 2 method2(); // Finished! method1();
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } Output 1 2 3 Console.WriteLine(“Method…”); method2(); Method 2 was called method1 Method 1 was called main 1 2 method2(); // Finished! method1();
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } method2 Output 1 2 3 Console.WriteLine(“Method…”); method2(); Method 2 was called method1 Method 1 was called main 1 2 method2(); // Finished! method1();
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } method2 1 Console.WriteLine(“Method…”); Output 1 2 3 Console.WriteLine(“Method…”); method2(); Method 2 was called method1 Method 1 was called Method 2 was called main 1 2 method2(); // Finished! method1();
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } method2 1 Console.WriteLine(“Method…”); Output 1 2 3 Console.WriteLine(“Method…”); method2(); Method 2 was called method1 Method 1 was called Method 2 was called main 1 2 method2(); // Finished! method1();
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } Output 1 2 3 Console.WriteLine(“Method…”); method2(); // Finished! Method 2 was called method1 Method 1 was called Method 2 was called main 1 2 method2(); // Finished! method1();
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } Output 1 2 3 Console.WriteLine(“Method…”); method2(); // Finished! Method 2 was called method1 Method 1 was called Method 2 was called Method 1 still alive main 1 2 method2(); // Finished! method1();
void method2() { Console.WriteLine(“Method 2 was called”); } void method1() { Console.WriteLine(“Method 1 was called”); method2(); Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } Output 1 2 3 Console.WriteLine(“Method…”); method2(); // Finished! Method 2 was called method1 Method 1 was called Method 2 was called Method 1 still alive main 1 2 method2(); // Finished! method1();
main void method2() { Console.WriteLine(“Method 2 was called”); } Console.WriteLine(“Method 1 still alive”); } void main() { method1(); } Output Method 2 was called Method 1 was called Method 2 was called Method 1 still alive main 1 2 method2(); // Finished! method1(); // Finished!