I am creating a list (myEmployeeList) as follows
myEmployeeList.Add(new Employee(12, "Anand", 25));
myEmployeeList.Add(new Employee(12, "Viral", 26));
myEmployeeList.Add(new Employee(12, "Meet", 20));
myEmployeeList.Add(new Employee(12, "Rahul", 28));
Now when i do sort with respect to ID column
myEmployeeList.Sort(Employee.IDComparison);
The resultant sorted list will be like
12 Meet 20
12 Rahul 28
12 Anand 25
12 Viral 26
Note : The list order is changing earlier it was (Anand,VIral,Meet,Rahul) now (Meet,Rahul,Anand,Viral)
Ideally it should not sort as the ID column is same (12) in all rows.
How can i avoide Sorting when the column data is same in all rows?
Please Respond
Thanks in Advance