This is my string
string test = "255\r\n\r\n0\r\n\r\n-1\r\n\r\n255\r\n\r\n1\r";
In order to find n1 in this string I have to do this:
string test = @"255\r\n\r\n0\r\n\r\n-1\r\n\r\n255\r\n\r\n1\r";
But what if I declared my string like this as its content came from a text box:
string test = this.textbox.Text.ToString();
How would I then find n1 in the same scenario as the example above as the code below does not work.
string test = @this.textbox.Text.ToString();
sting"\n" is one character, so there is no "n1" there. So what exactly are you looking for? a newline followed by a 1?