Hi,
I have a list of objects I want sorted by different properties. For example a list of customers that I want sorted by name, address or birth date.
I don't want to reload the array each time with a sort parameter. I've looked at the Array.Sort method but I haven't figured it out. Any help would be much appreciated.
![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)
graabein
I have a list of objects I want sorted by different properties. For example a list of customers that I want sorted by name, address or birth date.
Code:
public class Customer
{
private string name;
private string address;
private DateTime birthDate;
...
}
...
Customer[] customers = myDataAccess.GetAllCustomers();
I don't want to reload the array each time with a sort parameter. I've looked at the Array.Sort method but I haven't figured it out. Any help would be much appreciated.
![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)
graabein