Software Programs and Projects

This Software Programs and Projects include programing tips and technology using different languages like VC++,ASP,JSP C#.Net,PHP,VB.Net,JavaScript,ASP.NET .Software Programs and Projects blog mainly support to software programmers and provide help through the mail.

#region Function to check if a value is numeric

public static bool IsNumeric(string strValue)
{
int iCount = 0;
int iValue;
if (string.IsNullOrEmpty(strValue))
{
iCount = 0;
}
else
{
foreach (char cCharacter in strValue)
{
if (int.TryParse(Convert.ToString(cCharacter), out iValue))
{
iCount += 1;
}
else
{
iCount = 0;
return false;
}
}
}
if (iCount > 0)
return true;
else
return false;
}
#endregion

tag-:Check numeric in C#.NET

1 comments:

Very Good

Post a Comment

Post a Comment