|
2017/02/20(Mon) 22:12:43 編集(投稿者)
■No82941 (おろちょん さん) に返信 > dim text As String = 0.435425235,0.4545342554,0.003453425 Dim text As String = "0.435425235,0.4545342554,0.003453425" ではないですか?
> これをカンマでsplitしてsingleで定義された配列に格納したいのですが VB のバージョンにもよりますが:
Dim XYZ() As Single = text.Split(","c).Select(AddressOf Convert.ToSingle).ToArray()
別解:
Dim XYZ() As Single = Array.ConvertAll(text.Split(","c), AddressOf Convert.ToSingle)
Dim XYZ() As Single = Array.ConvertAll(Split(text, ","), Function(s) CSng(s))
|