C# Substring Function in ASP.Net

C# Substring function returns a part of specified string. Substring function returns the string part starting from the start index value passed to it. Another overloaded method of Substring function accepts an optional length parameter along with start index that returns the Substring of specified length starting from the specified index.

Try the following sample with different values to understand the C# Substring function:

Enter String:
Start Index:
Length :
[optional]
Output: