There are 10 lines in the textbox . How to remove the first three items? There is an option to copy the textbox to List<string> and change everything there, but I think there is a more elegant option.

  • What do you mean? В textbox есть 10 элементов. in the В textbox есть 10 элементов. ? So, there are 10 lines? Or 10 characters? Or something different? - Peter Olson
  • 10 lines .................... - Rajab

1 answer 1

You can get a collection of strings, and copy everything except the first three.

 var lines = textbox.Lines; var lastLines = lines.Skip(3); textbox.Lines = lastLines.ToArray();