我正试图在我的程序中编写以下代码:
xxxx.RunCommand("echo "select count(*) from TABLE_NAME;"|sqlplus DB Connection");现在,据我了解,RunCommand的语法是RunCommand(“understand”);
但在我的程序中,我需要使用多个“”。请建议这里的正确代码是什么。很抱歉问了这个基本问题。
发布于 2016-07-24 14:21:24
如果您想要转义它们,则需要使用\"。
xxxx.RunCommand("echo \"select count(*) from TABLE_NAME;\"|sqlplus DB Connection");或者用逐字字串文字加倍。
xxxx.RunCommand(@"echo ""select count(*) from TABLE_NAME;""|sqlplus DB Connection");https://stackoverflow.com/questions/38553014
复制相似问题