Length of clines[i] is 69
I have initialized index = 50
Code:
string substr = clines[i].Substring(index, clines[i].Length);
Now I want substring from index 50 to 69
But I am getting below exception
ArgumentOutOfRangeException: Index and length must refer to a location within the string. Parameter name: length
why I am getting this exception?
Substringis not(from, to). It's(from, howmany)Reading the actual documentation could have answered you, rather than creating this question.