Removes the character from the specified index to end of string.
For example:
string strOne = "Rocks Rum";
string newStr = strOne.Remove(2);
MessageBox.Show(newStr);
Output:
Ro (because all next characters are removed)
Another Example:
string strOne = "Rocks Rum";
string newStr = strOne.Remove(1,3);
MessageBox.Show(newStr);
Output:
Rs Rum (because from 1st index to 3rd characters are removed)
0 comments:
Post a Comment