Hacker News new | ask | show | jobs
by int_19h 408 days ago
If you want an unsafe union, that's what StructLayout.Explicit and FieldOffset is for - a struct with all fields placed at offset 0 is exactly the same as a C union.