Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,11 @@
|
|||
public static bool IsNumeric(string s)
|
||||
{
|
||||
double Result;
|
||||
return double.TryParse(s, out Result); // TryParse routines were added in Framework version 2.0.
|
||||
}
|
||||
|
||||
string value = "123";
|
||||
if (IsNumeric(value))
|
||||
{
|
||||
// do something
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
public static bool IsNumeric(string s)
|
||||
{
|
||||
try
|
||||
{
|
||||
Double.Parse(s);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue