Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Char.IsLetter Method

Indicates whether a Unicode character is categorized as an alphabetic letter.

Overload List

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

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function IsLetter(Char) As Boolean
[C#] public static bool IsLetter(char);
[C++] public: static bool IsLetter(__wchar_t);
[JScript] public static function IsLetter(Char) : Boolean;

Indicates whether the character at the specified position in a specified string is categorized as an alphabetic character.

[Visual Basic] Overloads Public Shared Function IsLetter(String, Integer) As Boolean
[C#] public static bool IsLetter(string, int);
[C++] public: static bool IsLetter(String*, int);
[JScript] public static function IsLetter(String, int) : Boolean;

Example

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

[Visual Basic, C#, C++] Note   This example shows how to use one of the overloaded versions of IsLetter. For other examples that might be available, see the individual overload topics.
[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

[C#] 
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
    }
}

[C++] 
#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.

See Also

Char Structure | Char Members | System Namespace

Show:
© 2016 Microsoft