using System.Runtime.InteropServices; [StructLayout(LayoutKind.Explicit)] struct Union { [FieldOffset(0)] public T1 Value1; }