SortedList values ....?

Jan 3 2008 8:21 PM

Hi,

I have SortedList (Records1). I that I am storing data in the format of

1. Records1.Add(Item.Date.ToShortDateString() + Item.ChanceryCode + Item.Reference.ToString() + Item.Year.ToString(), Item);
              
2. The keys for Record1 are

1/1/2006I11833802002
1/1/2007C12473522004
1/1/2007I12473342002
1/1/2007I12473352002
1/1/2007I12473362002
1/1/2007I12473382002
1/1/2007I12473442004
1/1/2007I12473452004
1/1/2007I12473532004
1/10/2006C11867322001
1/10/2006C11869032003

My question is
I have to iterate sortedlist year wise to get values and then I will do calculations Item taxes
for Example :

2001 has
1/10/2006C11867322001

2002 has
1/1/2007I12473342002
1/1/2007I12473342002
1/1/2007I12473352002
1/1/2007I12473362002
1/1/2007I12473382002

2003
1/10/2006C11869032003

2004
1/1/2007C12473522004
1/1/2007I12473442004
1/1/2007I12473452004
1/1/2007I12473532004


Finally I print

2001                                  1000.00 ( It's Total += Item.Tax for this  2001 yr)
2002                                   2300.00 ( It's Total += Item.Tax for this  2001 yr)
...
....


Please provide help on this.
Thanks in advance


Answers (1)