Io modificherei il tuo codice così:
codice:Dim TestArray() As String = fileContents.Split(CChar(Chr(10) + Chr(13))) Dim s As String = "" For i = TestArray.Length - 1 To 0 Step -1 If TestArray(i) <> "" Then ' copio solo righe non vuote. s = s + TestArray(i) + Environment.NewLine End If Next ' solo alla fine assegno la stringa al controllo TextBox1.Text = s![]()

Rispondi quotando