Javascpt Array to c# Arraylist (shift and pop)


I’m trying to convert a Unity JS script to C# sharp. in this script is made extensive use of an Unity Array that uses shift and pop command’s.

Google could not tell me how to convert this with equal C# arraylist commands.

Please help.


You could use a generic List and RemoveAt (which incidentally should also be used for JS, not Array, assuming there’s only one type being used in the list).

Use a LinkedList?

I think you can get the behavior you want from this.