【发布时间】:2013-08-08 13:07:57
【问题描述】:
假设多行文本框中的一个段落包含:
stringrandom@good
stringra12312@good
stringr2a123@bad
strsingra12312@good
strinsgr2a123@bad
我想产生这样的输出:
stringrandom@good
stringra12312@good
strsingra12312@good
我尝试过使用
If TextBox1.Lines.Count > 2 Then
Dim newList As List(Of String) = TextBox1.Lines.ToList
If newList.Contains("@bad") Then
newList.RemoveAt(newList.Item(newList.Contains("@bad")))
End If
TextBox1.Lines = newList.ToArray
End If
它不起作用,有人知道解决方法吗?
【问题讨论】:
-
对于未来的问题,请始终定义“不起作用”。这个关键短语很常见,而且不言自明。
标签: .net arrays vb.net string linq