We can deal with strings as an array of characters. This means that we can access the characters of the string separately using a formula as follows:
string m = "a world";
char c = m[1];
Reading the characters in this way is possible, but we can not use this method to assign characterss to any text string that is acceptable to code the following:
m[1] = 'w';
So that we can get a char array can write to it we use it ToCharArray () which returns a array characters represent the array codes the text string:
string m = "a world";
char[] c = m.ToCharArray();