String.Remove Method (Int32, Int32)
Returns a new string in which a specified number of characters in the current instance beginning at a specified position have been deleted.
Assembly: mscorlib (in mscorlib.dll)
The zero-based position to begin deleting characters.
The number of characters to delete.
Return ValueType: System.String
A new string that is equivalent to this instance except for the removed characters.
Either startIndex or count is less than zero.
startIndex plus count specify a position outside this instance.
In the .NET Framework, strings are zero-based. The value of the startIndex parameter can range from zero to one less than the length of the string instance.
This method does not modify the value of the current instance. Instead, it returns a new string in which the number of characters specified by the count parameter have been removed. The characters are removed at the position specified by startIndex.
Available since 4.5
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 8.1