// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; public struct AStruct { public int v; } public class AClass { public int v; } class MainClass { public static void Main(string[] args) { AStruct s; AClass c = new AClass(); s.v = 123; c.v = 123; AStruct s2 = s; AClass c2 = c; s2.v++; c2.v++; Console.WriteLine(s.v + " " + c.v); } }