I decided to group the collection by length of the string.Need suggestion from you to correct myself.
string[] collection = {"five","four","ten","one"};
var GroupedValues =
from w in collection
group w by w.Length into GetByGroup
select GetByGroup;
foreach (var g in GroupedValues)
{
Console.WriteLine(g);
}
The output is :
System.Linq.Lookup....
System.Linq.Lookup....
What went wrong ?