Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.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列表(字符串)到Long()_Vb.net - Fatal编程技术网

VB.NET列表(字符串)到Long()

VB.NET列表(字符串)到Long(),vb.net,Vb.net,如何将列表(字符串)转换为Long()? 我有这个: Dim List As New List(Of String) List.Add("0044001") List.Add("0044002") List.Add("0044003") 我需要将其转换为Long(),因为函数参数是“Long[]msisdns”(C#library),我可以执行New Long(){004400100440020044003},但这不是我想要的,或者如何添加到Long数组中? 提

如何将列表(字符串)转换为Long()? 我有这个:

    Dim List As New List(Of String)
    List.Add("0044001")
    List.Add("0044002")
    List.Add("0044003")
我需要将其转换为Long(),因为函数参数是“Long[]msisdns”(C#library),我可以执行
New Long(){004400100440020044003}
,但这不是我想要的,或者如何添加到Long数组中? 提前谢谢

使用:

如果您不想使用LINQ

Dim Longs2 = List.ConvertAll(AddressOf Convert.ToInt64).ToArray
使用:

如果您不想使用LINQ

Dim Longs2 = List.ConvertAll(AddressOf Convert.ToInt64).ToArray