文字列を数値に変換する  次の文書

'文字列をInteger型に変換
Dim i As Integer = Integer.Parse("100")

'文字列をLong型に変換
Dim l As Long = Long.Parse("100")

'文字列をSingle型に変換
Dim f As Single = Single.Parse("100.1")

'文字列をDouble型に変換
Dim d As Double = Double.Parse("100.1")

'文字列をBoolean型に変換
Dim b As Boolean = Boolean.Parse("True")

参考 http://dobon.net/vb/dotnet/programing/convert.html

 



← 左の文字をここへ入力後 登録ボタンをクリックしてください

(サイト管理者承認後掲載されます)