Sorting List On Multiple Fields In C#

To sort a list on multiple fields in C# use Sort() and ThenBy() functions



listObj = listObj.OrderBy(t => t.Name).ThenBy(t => t.Address).ToList();
zp8497586rq
Tags: , , , ,

Comments are closed.