如何构建双引号字符串

如何构建双引号字符串

本文介绍了如何构建双引号字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何分配这个

dateTimeConnect,dateTimeDisconnect,lastRedirectDn,pkid,originalCalledPartyNumberPartition,callingPartyNumberPartition



到c#中的字符串?

how to assign this
""dateTimeConnect","dateTimeDisconnect","lastRedirectDn","pkid","originalCalledPartyNumberPartition","callingPartyNumberPartition""

to a string in c# ?

推荐答案

string str =  "My friend told" +"\"being late is better than never\"";

StringBuffer strBuf = new StringBuffer();

strBuf.Append(str);



其中\用于转义下一个字符。



希望这可以帮助你

干杯


Where \ is used to escape the next character to it.

Hope this helps you
Cheers


string str =
"\"dateTimeConnect\",\"dateTimeDisconnect\",\"lastRedirectDn\",\"pkid\",\"originalCalledPartyNumberPartition\",\"callingPartyNumberPartition\"";


string str = "\"dateTimeConnect" + "\"," + "\"dateTimeDisconnect" + "\"," + "\"lastRedirectDn" + "\"," + "\"pkid" + "\"," + "\"originalCalledPartyNumberPartition" + "\"," + "\"callin\"";





我希望这会对你有帮助。



I hope this will help you.


这篇关于如何构建双引号字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 15:04