VB.NET列表(字符串)到Long()
如何将列表(字符串)转换为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数组中? 提
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