What's the point using String.ToCharArray if a string is a char array itself?

c#

Solution

A string is not a char array. You are confusing the fact that it has an indexer returning char with it being a char array.

Problem

``` string s = "string"; Console.WriteLine(s[1]); // returns t char[] chars = s.ToCharArray(); Console.WriteLine(chars[1]); // also returns t ``` so what is the point in this method?

Original source