方法一 For Each li As String In Forms("窗口1").Controls("TextBox1").Lines If li.EndsWith("/") Then li = li.TrimEnd("/") End If Next
方法二 Dim t As WinForm.TextBox = Forms("窗口1").Controls("TextBox1") For i As Integer = 0 To t.Lines.Length - 1 If t.Lines(i).EndsWith("/") Then t.Lines(i) = t.Lines(i).TrimEnd("/") End If Next