For reference, first read the article:
http://www.csharpfriends.com/articles/getArticle.aspx?articleID=377&page=1
mosessaur,
Your implementation of a static sort enumeration is a clever approach, but isn't this what the IComparer interface was intended for? It may be more tedious to code at first, but I think it would be easier down the road to simply write:
ArrayList employees = new ArrayList();
//...
employees.Sort(EmployeeSortByName); //EmployeeSortByName implements IComparer
employees.Sort(EmployeeSortByID); //EmployeeSortByID implements IComparer
instead of:
ArrayList employees = new ArrayList();
//...
Employee.SortBy = SortyBy.ID;
employees.Sort();
Employee.SortBy = SortBy.Name;
employees.Sort();

1 answers
This post was imported from csharpfriends, if you have a similiar question please ask it again.
All previous members have been migrated, hope you enjoy the new platform!