how to treat string as char array in c# code example
Example 1: string to char array c#
string chars = "Array";
char[] letters = chars.ToCharArray();
Example 2: create char array c#
char[] arr = new char[5];
arr[0] = 'a';
arr[1] = 'b';
arr[2] = 'c';
arr[3] = 'd';
arr[4] = 'e';
//OR
char[] arr = new char[] {'a', 'b', 'c', 'd', 'e'};