Linq Query:
Output:
//Distinct string[] strDays = { "Monday", "SaturDay", "Monday","Friday","TuesDay","SaturDay" }; //Repeated Days" Monday,SaturDay var days = strDays.Distinct(); foreach (var t in days) { Console.WriteLine(t.ToString()); }
Output:
Monday
SaturDay
Friday
TuesDay
0 comments:
Post a Comment