static void Main(string[] args) { //killmemory(); //killstack(1); int i = 5; Inc(i);//pass by copy Console.WriteLine(i); bubo a = new bubo(); a.name = "the king"; Console.WriteLine(a.name); clearname(a); Console.WriteLine(a.name); }
static void clearname(bubo b) { b.name = "no name"; }