Code · 19 lines · 312 bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19using System;
using System.Runtime.InteropServices;

namespace NEbml.Core
{
	[StructLayout(LayoutKind.Explicit)]
	internal struct Union
	{
		[FieldOffset(0)]
		public UInt32 uival;
		[FieldOffset(0)]
		public float fval;

		[FieldOffset(0)]
		public UInt64 ulval;
		[FieldOffset(0)]
		public double dval;
	}
}