markzzz markzzz - 5 months ago 17
C# Question

How can I order a List<string>?

I have this List :

IList<string> ListaServizi = new List<string>() { };


how can I order it due to the strings inside it? Alphabetic and ascending.

Answer
ListaServizi =ListaServizi.OrderBy(q => q).ToList();