I have a line like this: 2899 8761 014 00:00:00 06/03/13 09:35 G918884770707 . I have to take the substring G918884770707 from this string. I know the beginning of the substring, so I take the end of the substring as the length of the entire string as follows:
No = line.Substring(Start,End);
Here, the Start value is 39 , and the length of the main line is 52 , so this is the value for End.
This causes an error:
The index and length must refer to the location inside the string error in the substring
How to resolve this?
shubham hegdey
source share