c# richtextbox limit number of lines code example
Example: limit line count richtextbox
var lines = richTextBox1.Lines;
richTextBox1.Lines = lines.Skip(lines.Length - 2).ToArray();
var lines = richTextBox1.Lines;
richTextBox1.Lines = lines.Skip(lines.Length - 2).ToArray();