List
{ new Employee { Name = "N1", Salary = "N1-1" } ,
...
};
SortSalary sortSal = new SortSalary();
employeeList.Sort(sortSal);
}
class SortSalary: IComparer
{
#region IComparer
public int Compare(Employee x, Employee y)
{
return string.Compare(x.Salary, y.Salary);
}
#endregion
}

Shweta LodhaRank #31 · 39.8K reputationPosted Jan 26, 2016, 11:03 PM EST
Nithika64 reputationPosted Jan 26, 2016, 11:09 PM EST