【发布时间】:2012-03-10 09:38:25
【问题描述】:
我需要一个可用于页眉的字符串。问题是当我使用 vbcrlf 时,我不知道如何回来写。 示例:
dim MyStr As String = "Amount to be" & vbcrlf & "Deducted in This Month" & VbCrLf
MyStr &= "Amount Paid Last" & VbCrLf & "Month" & VbCrLf
这给了我输出
Amount to be
Deducted in This Month
Amount Paid Last
Month
'---我想要这样的输出
Amount to be Amount Paid Last
Deducted in This Month Month
'请帮我找出解决办法。
【问题讨论】:
-
你在做什么?您使用任何变量来表示月份和金额?
-
这仅用于文本文件的标题.....我有数量的变量
-
您的输出正是您构建它的方式。字符串没有附加值。并且您以错误的顺序附加到预期的输出
-
所以你想要,"要支付的金额>,本月最后扣除的>" 你应该使用像“Amount to be Paid=>,本月最后一次扣除= >"
-
我要标题------ 本月扣除金额----- 上个月支付的金额........(注意金额为上个月扣除的金额很长,所以我必须把这个包起来……但是在把上个月支付的金额包在第二行之后。)
标签: vb.net visual-studio-2010 vb.net-2010