Text = textBox.Text;
if (Text.StartsWith("!say"))
{
string[] CurrentText = Text.Trim().Split(' ');
label1.Text = CurrentText[1];
label2.Text = CurrentText[2] += CurrentText[3];
}
I’ve done a lot of searching and it’s probably easy, but I couldn’t find anything, but I want anything past CurrentText[2] to be put onto label2.Text, not just the 2nd and 3rd, is there anyway to do this? Also, how can I keep the spaces in between(such as if I put "!say Hello Hello World!" would come out as
label1 = Hello
and
label2 = Hello World!
with the space.
Try
Since the array indexes are zero based
CurrentText[0]andCurrentText[1]have to be skipped.