Hi,
in c# if i have an arraylist populated like (ID, ITEMQUANTITY), and i would like to compare them by ID, how would i do that? I mean, i need to customize it so that i can compare it by the first value only, so if i want to insert another item i can check if the id is already in the list.... I know how to do it by looping through all the items in the arraylist, but I remember doing this in Java a while ago with overriding some interface or methods or something...
Currently i'm using SortedList which I can compare by KEY of (KEY, VALUE). But, the problem is, i dont want the items to be sorted... I want it to be so the last one in gets put on the last place. Maybe i can bypass converting to arraylist if i could just set the SortedList not to sort items...
Tnx!
Andrej