Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
From a List of strings we have to retrieve the capital letters using lambda expressions in C#
Posted

1 solution

Something like this should work:

C#
string s = "This is Jason from the BBC.";

var arr = s.Where(c => Char.IsUpper(c));

foreach (char c in arr)
{
    Console.Write(c);
}

Console.WriteLine();
 
Share this answer
 
Comments
Vigneshb6 12-Aug-10 3:03am    
Reason for my vote of 5
Thanks Very help Full

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900