code_junkie

Difference between Char.IsDigit() and Char.IsNumber() in C#

Nov 11th, 2011
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. static private void test()
  2. {
  3. for (int i = 0; i <= 0xffff; ++i)
  4. {
  5. char c = (char) i;
  6.  
  7. if (Char.IsDigit( c) != Char.IsNumber( c)) {
  8. Console.WriteLine( "Char value {0:x} IsDigit() = {1}, IsNumber() = {2}", i, Char.IsDigit( c), Char.IsNumber( c));
  9. }
  10. }
  11. }
Add Comment
Please, Sign In to add comment