C# | Char.IsLower() Method - GeeksforGeeks

31 Jan, 2019
In C#, Char.IsLower() is a System.Char struct method which is used to check whether a Unicode character can be categorized as a lowercase letter or not. Valid lowercase letters will be the members of UnicodeCategory: LowercaseLetter. This method can be overloaded by passing different type and number of arguments to it.
Char.IsLower(Char) MethodChar.IsLower(String, Int32) Method
Char.IsLower(Char) Method
Char.IsLower(String, Int32) Method
This method is used to check whether the specified Unicode character matches lowercase letter or not. If it matches then it returns True otherwise return False.
Syntax:
public static bool IsLower(char ch);
Parameter:
ch: It is required Unicode character of System.char type which is to be checked.
Return Type: The method returns True, if it successfully matches any lowercase letter, otherwise returns False. The return type of this method is System.Boolean.
Example:
// C# program to illustrate the// Char.IsLower(Char) Methodusing System;  class GFG {      // Main Method    static public void Main()    {          // Declaration of data type        bool result;          // checking if g is a        // lowercase letter or not        char ch1 = 'g';        result = Char.IsLower(ch1);        Console.WriteLine(result);          // checking if 'G' is a        // lowercase letter or not        char ch2 = 'G';        result = Char.IsLower(ch2);        Console.WriteLine(result);    }}
True
False

This method is used to check whether the specified string at specified position matches with any lowercase letter or not. If it matches then it returns True otherwise returns False.
Syntax:
public static bool IsLower(string str, int index);
Parameters:
Str: It is the required string of System.String type which is to be evaluate.index: It is the position of character in string to be compared and type of this parameter is System.Int32.
Return Type: The method returns True if it successfully matches any lowercase letter at the specified index in the specified string, otherwise returns False. The return type of this method is System.Boolean.
Exceptions:
If the value of str is null then this method will give ArgumentNullException
If the index is less than zero or greater than the last position in str then this method will give ArgumentOutOfRangeException.
Example:
// C# program to illustrate the// Char.IsLower(String, Int32) Methodusing System;  class GFG {      // Main Method    static public void Main()    {          // Declaration of data type        bool result;          // checking for lowercase letter in        // a string at a desired position        string str1 = "GeeksforGeeks";        result = Char.IsLower(str1, 2);        Console.WriteLine(result);          // checking for lowercase letter in a        // string at a desired position        string str2 = "geeksForgeeks";        result = Char.IsLower(str2, 5);        Console.WriteLine(result);    }}
True
False

Reference: https://docs.microsoft.com/en-us/dotnet/api/system.char.IsLower?view=netframework-4.7.2
CSharp-Char-Struct
CSharp-method
C#
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Difference between Abstract Class and Interface in C#
String.Split() Method in C# with Examples
C# | How to check whether a List contains a specified element
C# Dictionary with examples
C# | IsNullOrEmpty() Method
C# | Delegates
C# | Method Overriding
C# | Arrays of Strings
C# | Abstract Classes
Difference between Ref and Out keywords in C#