You can sort the array using.
var sortedstrings = myStringArray.OrderBy( s => s );
This will return the instance Ienumerable. If you need to save it as an array, use this code.
myStringArray = myStringArray.OrderBy( s => s ).ToArray();
I'm not sure what you mean when you say that you need to implement some interfaces, but you do not need to do this when using IEnumerable.OrderBy. Just pass Func<TSource, TKey>in a lambda expression.
source
share