CSharp examples for Custom Type:Method
Implement Simple Recursion
using System;//from w w w .j ava 2 s . co m class TestRecursive { public static void Main() { Recurs(3); } public static void Recurs(int level) { Console.WriteLine("First part of Recurs. Level: {0}", level); if (level == 1) return; else Recurs(level - 1); Console.WriteLine("Last part of Recurs. Level: {0}", level); } }