Sort Collection String Ascending

Hi ,

I have a List String(System.Collection.Generic.List<system.string>) in which I added elements using “Add to Collections”, Now I want to sort this list ascending. Is there any function or way to sort this?

Thanks

Refer this post.

Thanks Karthik. It worked, if you have any idea how to make it work Descending?

You can use Linq Assign newList = list.OrderByDescending(Function(x) x).ToList()

3 Likes