vb.net如何发送含双引号的字符串。转义双引号

中文引号直接放在字符串里面即可,英文引号用Chr(34)表示,如
Dim phrase As String = "a" & Chr(34) & "b"


Dim strparam As String = "inputJson :{"
        strparam += Chr(34) & "fromUser" & Chr(34) & ":" & Chr(34) & "fmps" & Chr(34) & ","
        strparam += Chr(34) & "toUser" & Chr(34) & ":" & Chr(34) & "fcps" & Chr(34) & ","
        strparam += ""
        strparam += ""


输出: inputJson:{"fromUser":"fmps","toUser":"fcps",


posted @ 2016-07-29 14:08  离。  阅读(163)  评论(0编辑  收藏  举报