StringRemove Method (Int32) |
Returns a new string in which all the characters in the current instance, beginning at a specified position and continuing through the last position, have been deleted.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public string Remove(
int startIndex
)
Parameters
- startIndex
- Type: SystemInt32
The zero-based position to begin deleting characters.
Return Value
Type:
StringA new string that is equivalent to this string except for the removed characters.
Exceptions Exception | Condition |
---|
ArgumentOutOfRangeException | startIndex is less than zero.-or- startIndex specifies a position that is not within this string. |
See Also