我有下面的代码;
Dim orderlist As List(Of String) = New List(Of String)
For i As Integer = 0 To newacctlist.Items.Count - 1
orderlist.Add("This order will be placed on" & newacctlist.Items(i))
Next (i)
Textbox1.Lines = orderlist.ToArray
结果,当我从 txt 文件导入项目时,第一个我出来是正确的,但下一个得到了不必要的中断。他们出来:
This order will be placed on
Monday
代替
This order will be placed on Monday
从txt文件导入
Dim a As String = My.Computer.FileSystem.ReadAllText(path & "\neworder.txt")
Dim b As String() = a.Split(vbNewLine)
newacctlist.Items.AddRange(b)
我该如何解决这个错误?
提前致谢