I have a textbox that will always have a delimiter in between two words such as Houston|Texas
How do I get the length of the text before, and the length of the text after the '|' delimiter into two separate integers?
Try this:
string strTest = "Houston|Texas";
string[] strArr = strTest.Split('|');
int intFirst = strArr[0].Length; //Will result to 7
int intSecond = strArr[1].Length; //Will result to 5