||Implementing Custom Data Bindable Classes: CollectionBase|
|Subject:||Using objects with more than 1 property|
This is a great article, however, if I had a products class with 10 properties, and wanted to allow a user to sort on any property, would I have to write 10 different 'AscendingNameSorter' type classes?
ie: AscendingTypeSorter, AscendingManufacturerSorter, etc.
private class AscendingNameSorter : IComparer
public int Compare(Object x, Object y)
Products.Product p1 = (Products.Product)x;
IComparable ic1 = (IComparable)p1.Name;
Showing messages 1 through 2 of 2.
Implementing sort for multiple properties
2005-01-12 15:30:47 Daniel_Odulo [View]
Using objects with more than 1 property
2004-09-13 16:09:47 jamesstill [View]