static void Main(string[] args) { short a = 1; short b = 2; Swap(&a, &b); Console.WriteLine(a); Console.WriteLine(b); return; Lion l = new Lion(); LionGrow(l); Console.WriteLine(l.Age); Cat c = new Cat(); CatGrow(c); Console.WriteLine(c.Age); }
static void GrowLion(Lion a) { a.Age++; }
static void LionGrow(Lion a) { a.Age++; }