见下图,想把文本框里的内容去掉换行符后,用竖线符号拼接
我写的代码是:
Dim tx As WinForm.TextBox = e.Form.Controls("TextBox1")
Dim sts() As String = tx.value.split(vbcrlf)
Dim str As String
For Each st As String In sts
str = str & "|" & st.trim(vbcrlf)
Next
msgbox(str.trim("|"))
但出来不是想要的效果,希望是出来: 1|2|3
请问怎么改代码呢?
此主题相关图片如下:qq截图20171026201625.jpg
![dvubb 按此在新窗口浏览图片](UploadFile/2017-10/2017102620191957497.jpg)
[此贴子已经被作者于2017/10/26 20:41:08编辑过]