C# substring

Last modified: June 29, 2021
static void Main(string[] args) { var myString = "This is an apple"; var subString1 = myString.Substring(5); //start from 5 index //ouput is an "apple" var subString2 = myString.Substring(5, 2); //start from 5 index and upto 2 digit //ouput is "is" }