I have a single dimensional array of items declared and initialized as:
string[] SubDirectorylist = Directory.GetDirectories(TargetDirectory);
I’d like to reverse the members and found Enumerable.Reverse<TSource>().
What advantages, if any, does LINQ’s implementation of reverse have over Array.Reverse()?
System.Linq.Enumerable.Reverse()works on all classes that implementIEnumerablewhere asSystem.Array.Reverse()only works on arrays. If you know that you have an array, there is nothing wrong with usingSystem.Array.Reverse().