isNumber() fuction in c#

You have a string value in your C# program and want to find out if it a numeric value.
Double.TryParse method, which returns true if the input string is a number. Here we see how you can use Double.TryParse to test number strings.

public static bool IsNumeric(string s)
    double Result;
    return double.TryParse(s, out Result);  
string value = "143";
if (IsNumeric(value)) 
  // do something
Check string is number,


One response to “isNumber() fuction in c#”

  1. Hello,

    I am Thomas John representing Content Grid. We are a team of content writers from all over the world who specialize in developing content for a variety of websites including and

    We have an upcoming website and we were seeking talented writes with a flair for programming to join our community of writers. We happened to come across your blog on the web and we were wondering whether you would be interested in writing programming related articles for us.

    We can provide sufficient compensation for your writings and we are looking forward to having you as one of our writers in our community. If you are interested in this opportunity then please contact us for the work description and rates.

    Contact id: [email protected]



    Thomas John

    Content Grid.

Leave a Reply