using System.Runtime.InteropServices;
static void Main(string[] args)
int[] array = new int[20];
array[1] = (int)typeof(Klass).TypeHandle.Value;
GCHandle arrayHandle = GCHandle.Alloc(array);
var arrayAddress = Marshal.ReadIntPtr(GCHandle.ToIntPtr(arrayHandle));
Holder<Klass> holder = new Holder<Klass>();
GCHandle holderHandle = GCHandle.Alloc(holder);
var holderAddress = Marshal.ReadIntPtr(GCHandle.ToIntPtr(holderHandle));
Marshal.WriteIntPtr(holderAddress, 4, arrayAddress + 3 * 4);
Console.WriteLine(holder.reference.GetType());
Console.WriteLine(holder.reference.Field);
Console.WriteLine(holder.reference.Field);