i have a vb.net project and i have text in a multi-line textbox like this
abc
def
ghi
jkl
mn
every line starts with spaces i want to remove the initial spaces from all line
i've tried
For Each lne In TextBox1.Lines
If lne.StartsWith(" ") Then
TextBox1.Text = TextBox1.Text.Replace(" ", "")
End If
Next
but it deletes other texts in the text box and won't work