I\'m trying to figure out what I\'m doing wrong here, but I can\'t seem to. I have this method that takes in a string and reverses it. However, when I print out the reversed str
By calling ToString
you just get the default implementation that every class inherits from object
. .NET can't provide a special implementation just for an array of char; the override would have to apply to all types of array.
Instead, you can pass the array to String's constructor, return new String(reversedString)
.