Sort list of string in ascending order


#1

Hi may i ask if there is a way to sort list of string in ascending order?
I know we can do it via invoke method for array of string, but my list is dynamic and the previous step is adding string to list


#2

Hi @inyourgravity,

you can sort List of string with yourStringList.Sort() into ascending order by using assign activity with the same string list name.

Check this link for more details on this.

https://msdn.microsoft.com/en-us/library/b0zbh7b6(v=vs.110).aspx

based on the need we can go for Order by as well.


#3

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


#4

@inyourgravity
You can use Array.Sort function to sort array of strings in ascending order