I have this code. I am trying to retrieve just the text \"first program\". Considering that i know the index say 25 and total length of string is 35.
string
During this time you can use
(LINQ ElementAt) and (ElementAtOrDefault) method. However the ElementAt extension method would throw the System.ArguementOutOfRangeException when the specified index is a negative value or not less than the size of the sequence .