Remove element of a regular array

前端 未结 15 2492
野性不改
野性不改 2020-11-22 10:06

I have an array of Foo objects. How do I remove the second element of the array?

I need something similar to RemoveAt() but for a regular array.

15条回答
  •  执笔经年
    2020-11-22 10:23

        private int[] removeFromArray(int[] array, int id)
        {
            int difference = 0, currentValue=0;
            //get new Array length
            for (int i=0; i

提交回复
热议问题