我怎样才能在VB.NET数组删除项目? [英] How can I delete an item from an array in VB.NET?

查看:197
本文介绍了我怎样才能在VB.NET数组删除项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能在 VB.NET

推荐答案

您不能。我建议你​​把数组元素插入到 列表 ,至少那么你可以删除项目。数组可以使用使用ReDim 进行扩展,例如但一旦被创建无法删除的数组元素。你将不得不从头开始重新构建阵列做到这一点。

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.

这篇关于我怎样才能在VB.NET数组删除项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆