

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Check whether the specified Unicode character is a letter or a decimal digit in C#
To check whether the specified Unicode character is a letter or a decimal digit, the code is as follows −
Example
using System; public class Demo { public static void Main() { bool res; char val = '1'; Console.WriteLine("Value = "+val); res = Char.IsLetterOrDigit(val); Console.WriteLine("Is the value a letter or digit? = "+res); } }
Output
This will produce the following output −
Value = 1 Is the value a letter or digit? = True
Example
Let us see another example −
using System; public class Demo { public static void Main() { bool res; char val = '$'; Console.WriteLine("Value = "+val); res = Char.IsLetterOrDigit(val); Console.WriteLine("Is the value a letter or digit? = "+res); } }
Output
This will produce the following output −
Value = $ Is the value a letter or digit? = False
- Related Questions & Answers
- Check whether the Unicode character is a lowercase letter in C#
- Check whether the specified Unicode character is a punctuation mark in C#
- Check whether the Unicode character is a separator character in C#
- Indicate whether the specified Unicode character is white space in C#
- Check whether the entered value is a letter or not in Java
- Check whether the entered value is a digit or not in Java
- Check whether the specified character has a surrogate code in C#
- Check whether a character is Lowercase or not in Java
- Check whether a character is Uppercase or not in Java
- Java Program to check whether the entered character a digit, white space, lower case or upper case character
- Check input character is alphabet, digit or special character in C
- C++ Program to Check Whether a character is Vowel or Consonant
- Java Program to Check Whether a Character is Alphabet or Not
- Match Unicode character specified by the hexadecimal number XXXX.
- How to check if a character in a string is a letter in Python?
Advertisements