Process.Start - Pass html code to exe as argument

后端 未结 4 1064
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-19 05:09

I am using the code below to start a executable file from a windows service and I need to pass html code (stored in a variable) as an argument. I am escaping with double quo

4条回答
  •  生来不讨喜
    2021-01-19 05:49

    " \"" + subject + "\" \"" + htmlVar

    Becomes

    "SomeSubject" "SomeHTMLVar

    Notice there is no closing quote. Maybe you wanted this:

    " \"" + subject + "\" \"" + htmlVar + "\""

提交回复
热议问题