Posted By

gyurisc on 11/10/10


Tagged

Net c#


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

franksmile0310
ovuncgursoy
Priestd09
danfinrud55


isNumber extension method for string in C#


 / Published in: C#
 

isNumber string extension method for testing strings.

  1. public static class StringExtensions
  2. {
  3. public static bool isNumber(this String str)
  4. {
  5. double temp;
  6. return double.TryParse(str, out temp);
  7. }
  8. }

Report this snippet  

You need to login to post a comment.