首先之後,我仍然在VB.net新我曾遇到一個奇怪的問題VB.net自動換行復制
我創造了一個工具,將拆分內容從多線文本框阿成的線字符串並添加一些字符並將其加入並顯示在另一個多行文本框B中(A - >拆分內容 - >添加字符 - >加入 - >顯示在B中)。樣本會是這樣
原始數據從A:
This
is
a
test
data
結果中顯示。B:
Row 0 = This
Row 1 =
is
Row 2 =
a
Row 3 =
test
Row 4 =
data
的源代碼是:
Row 0 = This
Row 1 = is
Row 2 = a
Row 3 = test
Row 4 = data
結果從乙COPIED
tempA = ""
tempB = ""
tempA = A.Text()
stringAry = tempA.Split(Environment.NewLine)
For iCounter As Integer = 0 To stringAry.Length - 1
tempB = tempB + "Row " + iCounter.ToString + " = " + stringAry(iCounter).ToString + Environment.NewLine
Next
B.Text() = tempB
所以我可以知道爲什麼複製的結果與顯示的結果不同,我怎麼解決這個問題?
問題在哪裏?我可以看到示例代碼和源代碼,但是你在問什麼? –
對不起,我想問的是爲什麼複製的結果會與顯示的結果不同,我該如何解決這個問題 – Robert
在你的源代碼中,只有你從A獲取原始數據並顯示結果B.你的意思是由B的COPIED結果?如果我手動將內容從B複製到記事本,則獲得相同的結果/格式。 – tezzo