NewBieS NewBieS - 3 months ago 8
C# Question

Simplest way to split a string to a char array

Is there simplest way to split the word/sentence into every single char and store into array?

Eg:
Me and you.

array = { 'M', 'e', ' ', 'a', 'n', 'd', ' ', 'y', 'o', 'u', '.' };

Answer

Well, this is pretty simple :

"Me and you".ToCharArray();