Linq Query:
Output:
//First Condition string[] strDays = { "Monday", "SaturDay", "Monday", "Friday", "TuesDay", "SaturDay" }; var day = strDays.First(s => s.StartsWith("S")); Console.WriteLine(day); //
Output:
SaturDay
0 comments:
Post a Comment