public static void Main(string[] args) { TheStruct s = new TheStruct(); TheClass c = new TheClass(); s.x = 1; s.x = 1; structtaker(s); classtaker(c); Console.WriteLine("s.x = {0}", s.x); Console.WriteLine("c.x = {0}", c.x); }
public static void classtaker(TheClass c) { c.x = 5; }