This documentation is archived and is not being maintained.

Char.IsLetter Method (Char)

.NET Framework 1.1

Indicates whether the specified Unicode character is categorized as an alphabetic letter.

[Visual Basic]
Overloads Public Shared Function IsLetter( _
   ByVal c As Char _
) As Boolean
public static bool IsLetter(
 char c
public: static bool IsLetter(
 __wchar_t c
public static function IsLetter(
   c : Char
) : Boolean;


A Unicode character.

Return Value

true if c is an alphabetic letter; otherwise, false.


Valid letters are members of the following categories in UnicodeCategory: UppercaseLetter, LowercaseLetter, TitlecaseLetter, ModifierLetter, and OtherLetter.


[Visual Basic, C#, C++] The following sample demonstrates IsLetter.

[Visual Basic] 
Imports System

Module IsLetterSample

    Sub Main()

        Dim ch8 As Char
        ch8 = "8"c

        Console.WriteLine(Char.IsLetter(ch8))                   ' Output: "False"
        Console.WriteLine(Char.IsLetter("sample string", 5))    ' Output: "True"

    End Sub

End Module

using System;

public class IsLetterSample {
    public static void Main() {
        char ch = '8';

        Console.WriteLine(Char.IsLetter(ch));                    // False
        Console.WriteLine(Char.IsLetter("sample string", 7));    // True

#using <mscorlib.dll>
using namespace System;

int main() {
   char ch = '8';

   Console::WriteLine(Char::IsLetter(ch));                  // False
   Console::WriteLine(Char::IsLetter("sample string", 7));  // True

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

Char Structure | Char Members | System Namespace | Char.IsLetter Overload List | Boolean