Mono Class Library: System.String Overview | Members

System.String.Substring Method

Retrieves a substring from the current instance, starting from a specified index.

public string Substring (int startIndex)

Parameters

startIndex
A int containing the index of the start of the substring in the current instance.

Returns

A string equivalent to the substring that begins at startIndex of the current instance. Returns string.Empty if startIndex is equal to the length of the current instance.

Exceptions

TypeReason
ArgumentOutOfRangeExceptionstartIndex is less than zero or greater than the length of the current instance.

Remarks

Documentation for this section has not yet been entered.

Requirements

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