Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
If TextBox11.Text.Contains("https") Then
TextBox11.Text.Replace("https", "http")
Debug.WriteLineIf(TextBox11.Text.Contains("http"), "youtube link https replaced with http")
If TextBox11.Text.Contains("https") Then
ListBox3.Items.Add(TextBox11.Text)
Debug.WriteLine("items added to listbox")
End If
Else
Debug.WriteLine("items added to listbox(without repalce)")
ListBox3.Items.Add(TextBox11.Text)
End If
End Sub
所以,我想在這裏做的是在textbox11以「https」來代替「https」開頭,然後將其添加到listbox3,但是,它不甚至替換文本出於某種原因,這是我需要一點幫助的地方。我知道,stringbuilder對此很好,但我不知道如何使用它,我只找到了如何替換指定的文本,但不是從整個句子。在文本替換文本,然後將其添加到列表框中
p.s.對不起我的英語不好。
不錯,做得很好,你在不到2分鐘內解決了我的問題,謝謝。 –