Check whether the Unicode character is a lowercase letter in C#

To check whether a Unicode character is a lowercase letter in C#, we use the Char.IsLower() method. This method examines the Unicode character and returns true if it represents a lowercase letter according to Unicode standards, and false otherwise.

Syntax

Following is the syntax for the Char.IsLower() method −

public static bool IsLower(char c)

Parameters

  • c − The Unicode character to evaluate

Return Value

The method returns a bool value −

  • true if the character is a lowercase letter

  • false if the character is not a lowercase letter

Char.IsLower() Character Evaluation Lowercase Letters a, b, c, ..., z é, ñ, ç, ü Returns: true Non-lowercase A, B, C, ..., Z 1, 2, @, #, ! Returns: false Supports Unicode characters from all languages including accented letters and non-Latin scripts

Using Char.IsLower() with Uppercase Character

The following example demonstrates checking an uppercase letter −

using System;
public class Demo {
   public static void Main() {
      bool res;
      char val = 'K';
      Console.WriteLine("Value = " + val);
      res = Char.IsLower(val);
      Console.WriteLine("Is the value a lowercase letter? = " + res);
   }
}

The output of the above code is −

Value = K
Is the value a lowercase letter? = False

Using Char.IsLower() with Lowercase Character

The following example demonstrates checking a lowercase letter −

using System;
public class Demo {
   public static void Main() {
      bool res;
      char val = 'd';
      Console.WriteLine("Value = " + val);
      res = Char.IsLower(val);
      Console.WriteLine("Is the value a lowercase letter? = " + res);
   }
}

The output of the above code is −

Value = d
Is the value a lowercase letter? = True

Using Char.IsLower() with Multiple Character Types

Here's an example testing various character types including Unicode characters −

using System;
public class Demo {
   public static void Main() {
      char[] characters = { 'a', 'Z', '5', '@', 'ñ', 'Ä' };
      
      foreach (char ch in characters) {
         bool isLower = Char.IsLower(ch);
         Console.WriteLine($"'{ch}' is lowercase: {isLower}");
      }
   }
}

The output of the above code is −

'a' is lowercase: True
'Z' is lowercase: False
'5' is lowercase: False
'@' is lowercase: False
'ñ' is lowercase: True
'Ä' is lowercase: False

Conclusion

The Char.IsLower() method provides a reliable way to determine if a Unicode character is a lowercase letter. It works with characters from all languages and Unicode categories, making it essential for international text processing and validation in C# applications.

Updated on: 2026-03-17T07:04:36+05:30

314 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements