Consider a RichTextBox which has 400 lines and includes a number of words and lines in diffident colours.
Is it possible to remove the first 100 lines of this text box, while the colour of remaining words are reserved. Currently, I am using the below code to remove lines, but It is not able to keep colours.
if (rtb.Lines.Count() > 400)
rtb.Lines = rtb.Lines.Skip(100).ToArray();
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…