I have a large string and its stored in a string variable str. And i want to get a substring from that in c#? Suppose the string is : \" Retrieves a substring from thi
\" Retrieves a substring from thi
You could do this manually or using IndexOf method.
IndexOf
Manually:
int index = 43; string piece = myString.Substring(index);
Using IndexOf you can see where the fullstop is:
int index = myString.IndexOf(".") + 1; string piece = myString.Substring(index);