I am Reading data from serialport. I just want 40 lines to appear in the textbox.
How I can erase lines older lines to make Place for new lines?
I tried the following code:
int numOfLines = 40;
var lines = this.textBox1.Lines;
var newLines = lines.Skip(numOfLines);
this.textBox1.Lines = newLines.ToArray();
But it gives me error, saying that " 'string[]' does not contain a definition for 'Skip' and no extension method 'Skip' accepting a first argument of type 'string[]' could be found".