StringSubstring Method (Int32) |
Retrieves a substring from this instance. The substring starts at a specified character position.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public string Substring(
int startIndex
)
Parameters
- startIndex
- Type: SystemInt32
The zero-based starting character position of a substring in this instance.
Return Value
Type:
StringA 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 Exception | Condition |
---|
ArgumentOutOfRangeException | startIndex is less than zero or greater than the length of this instance. |
See Also