サンプル
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button6.Click '浮動小数点数か調べる If Regex.IsMatch(Me.TextBox3.Text, "^[\-+]?[0-9]*\.?[0-9]+$") Then Me.Label1.Text = String.Format("{0}は浮動小数点数です。", _ Me.TextBox3.Text) Else Me.Label1.Text = "Error..." End If End Sub
参考文献
http://dobon.net/vb/dotnet/vb2cs/isnumeric.htmlhttp://park5.wakwak.com/~weblab/tipsSeikiHyogen5.html