Recursion with char[] in c# I am trying to learn recursion and have a question involving an array that needs to be reversed. I am focusing on c# but the language probably doesn't matter a whole lot because my function is not using any libraries.
Here is my code:
char[] ReverseString(char[] s, int i = 0)
{
    char[] x = s;
    char temp = s[i];
    s[i] = s[s.Length - (i + 1)];
    s[s.Length - (i + 1)] = temp;

    i++;
    if (i &lt; (s.Length) / 2)
    {
        ReverseString(s, i);
    }
    return x;
}

Any suggestions on how I should improve my function (maybe time complexity or using libraries (nuget packages)) is appreciated as well.
Honestly, this is not a very good problem to do recursively, just pick another problem. Here's a better one: take in an integer, and print the sum of the digits.
Some general feedback:

ReverseString returns something, but you ignore its return value
You make x, but it's a shallow copy of s -- modifying x and s do the same thing, and returning them would do the same thing. Just don't declare 'x' at all.
See how short you can make this. It's not good general advice, but it can be good advice when learning recursion.

One last tip when learning recursion: next time, try to do it without modifying a single variable. Just use expressions and return values. Again, it's not always how you should write real code, but it will help you learn faster.