Substring in Vb.Net String Class returns a new string that is a substring of this string. The substring begins at the specified given index and extended up to the given length.
Public Function Substring(ByVal startIndex As Integer, ByVal length As Integer) As String
Parameters:
startIndex: The index of the start of the substring.
length: The number of characters in the substring.
Returns:
The specified substring.
Exceptions:
System.ArgumentOutOfRangeException : the beginIndex or length less than zero, or the begin index + length not within the specified string
VB.NET SourceCode
When you execute this program , its will display "subtring" in the messagebox.