public static void Main()
var example = new Example();
example.GetStruct(0).IntValue = 5;
Console.WriteLine(example.GetStruct(0).IntValue);
private object[] _objects = new object[]
new MyStruct { IntValue = 3 }
public ref MyStruct GetStruct(int index)
return ref (MyStruct)_objects[index];