How to arrange or grouping value in the list? in C#
i have sorted list like this(please refer below code)
code
======
var sd = new SortedList<string, string>();
for (int p = 0; p < yearMatch.Count; p++)
{
sd.Add(YearAdded[p], Id[p]);
}
yearcount = sd.Keys.ToArray();
Id = sd.Values.ToArray();
=========================================
Example
===========
yearcount having year value 2000a,2000b,2000c,20003
Id having value 0020,0025,0030,0035
i want the output like this year value 2000a,b,c,2003
Id value 0020,0025,0030,0035
======================
if same year in the list i want to group that like above i said, i tried in many ways. please any one help guys.its imp and urgent.