Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 如何将system.net.ipaddress转换为system.collection arraylist_Vb.net - Fatal编程技术网

Vb.net 如何将system.net.ipaddress转换为system.collection arraylist

Vb.net 如何将system.net.ipaddress转换为system.collection arraylist,vb.net,Vb.net,我有一个具有多个ip地址的服务器。我正在使用system.net.ipaddress类来获取这些。现在我想将这些多个IP移动到一个字符串数组中,以便在需要时删除一些值。当我尝试这个的时候 Private ArrIpAddress As IPAddress() Private IpAddressList As ArrayList() IpAddressList = ArrIpAddress 我得到这个错误 无法将system.net.ipaddress的1维数组类型的值转换为system.co

我有一个具有多个ip地址的服务器。我正在使用system.net.ipaddress类来获取这些。现在我想将这些多个IP移动到一个字符串数组中,以便在需要时删除一些值。当我尝试这个的时候

Private ArrIpAddress As IPAddress()
Private IpAddressList As ArrayList()

IpAddressList = ArrIpAddress
我得到这个错误 无法将system.net.ipaddress的1维数组类型的值转换为system.collections.arraylist的1维数组


任何帮助都将不胜感激。

数组和ArrayList是两种不同的东西,不能互换。您可以将内容添加到另一个列表:IpAddressList.AddRangeArrIpAddress虽然T的列表可能比ArrayList更好,但感谢您的更新,我使用addrange将arripaddress转换为ArrayList。