我需要在 Windows 窗体应用程序的文本框中获取多行文本的前 10 行和后 10 行。
ex.(textbox values)
Chicken
Chinese
Beef
Pork
Mutton
Fish
Prawn
Vegetarian
--
---
最佳答案
var r1 = textBoxValues.Select(t=>t.values).Take(10);
var r2 = textBoxValues.Select(t=>t.values).Reverse().Take(10);
关于c# - 在文本框中获取前 10 行和后 10 行 C#,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35428962/