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 structtaker(TheStruct s) { s.x = 5; }