Getting Substrings of a given string C# with Example



Getting Substrings of a given string C# with Example

string helloWorld = "Hello World!"; 
string world = helloWorld.Substring(6); //world = "World!" 
string hello = helloWorld.Substring(0,5); // hello = "Hello" 
Substring returns the string up from a given index, or between two indexes (both inclusive). 

0 Comment's

Comment Form