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

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -