Open sandboxFocus

Method Substring

Substring(int)

Returns the substring starting at a given index and ending at the end of the current string.

Declaration
public string Substring(int startIndex)
Parameters
Type Name Description
int startIndex

The index of the first character of the substring.

Returns
Type Description
string

The substring that starts at startIndex.

Substring(int, int)

Returns the substring starting at a given index and having a specified length.

Declaration
public string Substring(int startIndex, int length)
Parameters
Type Name Description
int startIndex

The index of the first character of the substring.

int length

The number of characters to return.

Returns
Type Description
string

The substring that starts at startIndex and has length characters.