Converts a substring of this string to an array of characters.
[Visual Basic] Overloads Public Function Substring( _ ByVal startIndex As Integer _ ) As String [C#] public string Substring( int startIndex ); [C++] public: String* Substring( int startIndex ); [JScript] public function Substring( startIndex : int ) : String;
The substring of characters from the index to the end of the string.
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | If position where the index begins is less than zero or greater than the length of this string. |
The value of the startIndex parameter must be greater than or equal to zero and less than or equal to the length of this string.
If startIndex is equal to the length of this string, then the empty string is returned. String indices are 0-based.
String Class | String Members | System Namespace | String.Substring Overload List | Int32