Thank you all for the help I have got it working with your help.
So I have written some code which extracts the first word within a string. Below is my code.
var LongString = "Hello World";
var firstWord = LongString.Substring(0, LongString.IndexOf(" "));
This code gives me the result "Hello" however how can I retrieve the last word from the string if I do not know the last index. Is there a method in which I can get the last index number without feeding it with a string that is currently within the LongString variable. Thanks in advance.
var lastWord = longString.Split(' ',
StringSplitOptions.RemoveEmptyEntries)
.Last();
That's about it.