MrMistreater

IsNumeric extension method for strings

May 9th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.16 KB | None | 0 0
  1. public static class StringExtensions
  2. {
  3.     public static bool IsNumeric(this String str)
  4.     {
  5.         double temp;
  6.         return double.TryParse(str, out temp);
  7.     }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment