You need to store the return value in a variable:
var reversed = myArray.Reverse();
This is the signature for Reverse()
method you are using, by the way, this is an extension method in the Enumerable
class:
public static IEnumerable<TSource> Reverse<TSource>(this IEnumerable<TSource> source);
See the return type is an IEnumerable
so you will need to store that and then work with that.
You can just do this:
public static string ReverseString(string word)
{
return string.IsNullOrWhiteSpace(word) ? string.Empty
: string.Concat(word.Reverse());
}