How to use IsLetter in C#

2 Answers

0 votes
using System;

class Program
{
    static void Main() {
        char ch = 'a';
        bool result = Char.IsLetter(ch);
        Console.WriteLine(result);
        
        ch = '*';
        result = Char.IsLetter(ch);
        Console.WriteLine(result);
    }
}



/*
run:

True
False

*/

 



answered Aug 6, 2023 by avibootz
0 votes
using System;

class Program
{
    static void Main() {
        string str = "csharp programming";
        bool result = Char.IsLetter(str, 4);
        Console.WriteLine(result);
        
        str = "csharp programming";
        result = Char.IsLetter(str, 6);
        Console.WriteLine(result);
    }
}



/*
run:

True
False

*/

 



answered Aug 6, 2023 by avibootz

Related questions

2 answers 97 views
97 views asked Aug 6, 2023 by avibootz
1 answer 169 views
1 answer 217 views
217 views asked Aug 7, 2021 by avibootz
...