Putting a variable in an escaped string double quote
<p>Easy one, but annoying me :)</p>

<p>I am trying to subsitute a C# variable into a string that is already escaped and needs a double quote either side of the string for the WMI query to work.</p>

<p>Number one below works, this is where I hard code the string value</p>

<p>1.)</p>

<pre><code> ManagementObjectSearcher searchObject = new        ManagementObjectSearcher("root\\MicrosoftBizTalkServer", "Select * from MSBTS_HostInstance where HostType=1 AND RunningServer = \"s2vm8\"", enumOptions);
</code></pre>

<p>Number two, I am trying to put in the C# variable but not sure how to do this in an already escaped string...</p>

<p>2.)    </p>

<pre><code>            ManagementObjectSearcher searchObject = new ManagementObjectSearcher("root\\MicrosoftBizTalkServer", "Select * from MSBTS_HostInstance where HostType=1 AND RunningServer = \"&lt;c# variable&gt;\"", enumOptions);
</code></pre>

<p>My string at the end for the WMI call needs to look like this:</p>

<pre><code> Select * from MSBTS_HostInstance where HostType=1 AND RunningServer = "blah..."
</code></pre>

<p>Thanks for your help!</p>

<p>Conor</p>
