VB.NET
'''
<summary>
'''
String文字列が数値かどうか判定する方法
'''
</summary>
'''
<param name="strValue"></param>
'''
<returns></returns>
Public Shared Function
IsNumeric(strValue As String) As Boolean
Dim
dblVal As Double
Return Double.TryParse(strValue,
System.Globalization.NumberStyles.Any, Nothing,
dblVal)
End Function
C#
///
<summary>
///
String文字列が数値かどうか判定する方法
///
</summary>
///
<param name="strValue"></param>
///
<returns></returns>
public static bool
IsNumeric(string strValue)
{
double
dblVal;
return double.TryParse(
strValue,
System.Globalization.NumberStyles.Any,
null,
out dblVal
);
}