I have a string which is like this
187878 – my text comment – this is user comment – last
I have to take the first value, which is my employeeid i.e. 187878 and I need rest of the comment.
I use this,
string[] myText = textbox1.text.split('-');
but this broke the string into 3 peices and I am not able to get the comment as a whole. How can I get first id in a different variable and rest comment in different variable.
Do I need to loop again ?
Use the overload of
string.Splitthat takes a count: