How to get substring from string in c#? -
i have large string , stored in string variable str. , want substring in c#? suppose string : " retrieves substring instance. substring starts @ specified character position."
substring result want display is: the substring starts @ specified character position.
you manually or using indexof
method.
manually:
int index = 43; string piece = mystring.substring(index);
using indexof can see fullstop is:
int index = mystring.indexof(".") + 1; string piece = mystring.substring(index);
Comments
Post a Comment