string inputString = "My name is rohit"; string[] wordArray = inputString.Split(null); //split the string by whitespace. //count the no. of whitespace int countOfSpace = wordArray.Length -1; int index = 2; string newString = inputString.Substring(index); string wordAfterIndex = newString.Split(null)[1]; //specify the index as to which word you want from the array.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)