How can I delete an item from an array in VB.NET?

前端 未结 11 1723
别那么骄傲
别那么骄傲 2020-12-05 18:14

How can I delete an item from an array in VB.NET?

11条回答
  •  我在风中等你
    2020-12-05 18:27

    You can't. I would suggest that you put the array elements into a List, at least then you can remove items. An array can be extended, for example using ReDim but you cannot remove array elements once they have been created. You would have to rebuild the array from scratch to do that.

    If you can avoid it, don't use arrays here, use a List.

提交回复
热议问题