How to check if string contain lowercase characters with Linq in C#

1 Answer

0 votes
using System;
using System.Linq;

class Program
{
    static void Main() {
        String s = "C# VB.NET Python";
        
        if (s.Any(char.IsLower)) {
            Console.WriteLine("yes");
        } else {
            Console.WriteLine("no");
        }
    }
}



/*
run:

yes

*/

 



answered Nov 24, 2020 by avibootz

Related questions

1 answer 143 views
1 answer 154 views
1 answer 171 views
1 answer 294 views
...