string class : Remove(int) method
Description
Gets a new instance of the string that have been removed from the specified position to the end.
Syntax
stringInstance.Remove(int startPosition)
Arguments
Class | Name | Description |
int | startPosition | A start position of removing. |
Return value
Class | Description |
string | A new instance of the string that have been removed from the specified position to the end |
Sample code
//anyString is a instance of string type.
string removedString = anyString.Remove(5);
Notes
Position is specified by the index. The index is zero-based.
Links for reference
None