You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
880 B
37 lines
880 B
using System.Runtime.InteropServices; |
|
|
|
namespace gaemstone.Utility; |
|
|
|
[StructLayout(LayoutKind.Explicit)] |
|
internal struct Union<T1, T2> |
|
{ |
|
[FieldOffset(0)] public T1 Value1; |
|
[FieldOffset(0)] public T2 Value2; |
|
} |
|
|
|
[StructLayout(LayoutKind.Explicit)] |
|
internal struct Union<T1, T2, T3> |
|
{ |
|
[FieldOffset(0)] public T1 Value1; |
|
[FieldOffset(0)] public T2 Value2; |
|
[FieldOffset(0)] public T3 Value3; |
|
} |
|
|
|
[StructLayout(LayoutKind.Explicit)] |
|
internal struct Union<T1, T2, T3, T4> |
|
{ |
|
[FieldOffset(0)] public T1 Value1; |
|
[FieldOffset(0)] public T2 Value2; |
|
[FieldOffset(0)] public T3 Value3; |
|
[FieldOffset(0)] public T4 Value4; |
|
} |
|
|
|
[StructLayout(LayoutKind.Explicit)] |
|
internal struct Union<T1, T2, T3, T4, T5> |
|
{ |
|
[FieldOffset(0)] public T1 Value1; |
|
[FieldOffset(0)] public T2 Value2; |
|
[FieldOffset(0)] public T3 Value3; |
|
[FieldOffset(0)] public T4 Value4; |
|
[FieldOffset(0)] public T5 Value5; |
|
}
|
|
|