Mono Class Library: System.String Overview | Members

System.String.Substring Method

Retrieves a substring from the current instance, starting from a specified index, continuing for a specified length. [Edit]

public string Substring (int startIndex, int length)

Parameters

startIndex
A int containing the index of the start of the substring in the current instance. [Edit]
length
A int containing the number of characters in the substring. [Edit]

Returns

A string containing the substring of the current instance with the specified length that begins at the specified position. Returns string.Empty if startIndex is equal to the length of the current instance and length is zero. [Edit]

Exceptions

TypeReason
ArgumentOutOfRangeException

length is greater than the length of the current instance.

-or-

startIndex or length is less than zero.

[Edit]

Remarks

Documentation for this section has not yet been entered. [Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0