There is another way to do this, which is fitting perfectly for extension class.
public static void Push<T>(ref T[] table, object value){ Array.Resize(ref table, table.Length + 1); table.SetValue(value, table.Length - 1);}
What is going on here, is that we are resizing and then setting value for the new element created by Array.Resize(...)
method.
Here is a snippet with example usage.