reverse a string in c#

C#
public void ReverseString(char[] s) {
        
        for(int i = 0; i < s.Length / 2; i++) {
    	    
            char temp = s[i];
    	    s[i] = s[s.Length - 1 - i];
    	    s[s.Length - 1 - i] = temp;
     
     }
}public static string ReverseString(string s)
    {
        char[] arr = s.ToCharArray();
        Array.Reverse(arr);
        return new string(arr);
    }
Source

Also in C#: