Determining the character is placed at which location.
For example:
string strOne = "rocks Rum";
int count = strOne.IndexOf('R');
MessageBox.Show(count.ToString());
Output:
6 (because ‘R’ is located at index 6 from the start)
0 comments:
Post a Comment