Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to know character is a digit or not in c#

//IsDigit method
using System;
class Test 
{
  
    public static public void Main(String[] args)
    {
  		bool answer;
 		// checking if 1 is a digit or not
        char ch = '1';
        answer = Char.IsDigit(ch);
        Console.WriteLine(answer);
    }
}
 
PREVIOUS NEXT
Tagged: #character #digit
ADD COMMENT
Topic
Name
1+3 =