How do I convert a word into a character array?
Lets say i have the word \"Pneumonoultramicroscopicsilicovolcanoconiosis\" yes this is a word ! I would like to take
what about
char[] myArray = myString.ToCharArray();
But you don't actually need to do this if you want to iterate the string. You can simply do
for( int i = 0; i < myString.Length; i++ ){
if( myString[i] ... ){
//do what you want here
}
}
This works since the string
class implements it's own indexer
.