Click or drag to resize
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: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public string Remove(
	int startIndex
)

Parameters

startIndex
Type: SystemInt32
The zero-based position to begin deleting characters.

Return Value

Type: String
A new string that is equivalent to this string except for the removed characters.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionstartIndex is less than zero.-or- startIndex specifies a position that is not within this string.
See Also