Yes, you can refer to string characters using the same syntax as C ++, for example:
string myString = "dummy"; char x = myString[3];
Note: x will be assigned to m .
You can also iterate with a for loop, for example:
char y; for (int i = 0; i < myString.Length; i ++) { y = myString[i]; }
Finally, you can use the foreach to get the value already added to the char , for example:
foreach(char z in myString) {
source share