Click or drag to resize
StringSubstring Method (Int32)
Retrieves a substring from this instance. The substring starts at a specified character position.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public string Substring(
	int startIndex
)

Parameters

startIndex
Type: SystemInt32
The zero-based starting character position of a substring in this instance.

Return Value

Type: String
A string that is equivalent to the substring that begins at startIndex in this instance, or Empty if startIndex is equal to the length of this instance.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionstartIndex is less than zero or greater than the length of this instance.
See Also