C# Char IsLetter(String, Int32)
Description
Char IsLetter(String, Int32)
indicates whether the
character at the specified position in a specified string is categorized
as a Unicode letter.
Syntax
Char.IsLetter(String, Int32)
has the following syntax.
public static bool IsLetter(
string s,
int index
)
Parameters
Char.IsLetter(String, Int32)
has the following parameters.
s
- A string.index
- The position of the character to evaluate in s.
Returns
Char.IsLetter(String, Int32)
method returns true if the character at position index in s is a letter; otherwise, false.
Example
The following code example demonstrates IsLetter.
/* w w w. j a va 2 s . co m*/
using System;
public class IsLetterSample {
public static void Main() {
Console.WriteLine(Char.IsLetter("sample string", 7)); // True
}
}
The code above generates the following result.