0
我在一個長連接字符串中添加了一些內容(這很恐怖,我知道)。我如何知道我的字符串是否溢出到下一行
我必須顯示數據表中的3列數據,我的代碼看起來像這樣。
If Not IsNothing(MyBase.EligibilityQuestions) Then
Dim sw As System.IO.StringWriter
For Each row As DataRow In MyBase.EligibilityQuestions.Rows
sw = New System.IO.StringWriter
For Each col As DataColumn In MyBase.EligibilityQuestions.Columns
sw.Write(row(col).ToString() & ", ")
Next
OverFlowEndorsments &= sw.ToString()
OverFlowEndorsments &= nl
Next
End If
我的問題是我最終是溢出到一個新行和不排隊與它所屬,我寫這篇文章的DynamicPDF列中的文本,所以我不能插入文本HTML,我試圖讓這看起來像一個表(所有的列排隊)。
缺少每行中的字符數,我不知道該怎麼辦。
您可以在這裏什麼粘貼你完全是...... ..?也在每個循環內爲什麼你要創建一個新的StringWriter,你可以移動sw = New System.IO.StringWriter在每個循環的第一個之外,VB.NET是否使用了像我們在C#.NET中使用的StringBuilder,如果是的話創建一個該對象的實例並使用append方法,並在完成時將stringbuilder.ToString()內容寫入StringWriter – MethodMan