formatting strings with backslash
<p>I'm a newbie to c# so hopefully this one isn't too hard for a few of you.</p>

<p>I'm trying to build a string that has a \ in it and I am having difficulty getting just one backslash to show up even though I am adding additional escape chars or ignoring them all together. Can someone show me what I am doing wrong?</p>

<p>What I want my string to look like:</p>

<pre><code>"10.20.14.103\sql08"
</code></pre>

<p>What I've tried so far:</p>

<p>I added an additional character to make the compiler happy but it did not escape it.</p>

<pre><code>ip = string.Format("{0}\\\\{1}", ip, instancename); // output has 2 \'s
</code></pre>

<p>I told it to ignore escapes, it decided to ignore me instead</p>

<pre><code>string temp =  @"192.168.1.200\sql08"; // output has 2 \'s
</code></pre>

<p>Can someone help me make sense of this? (The richtext editor here seems to do a better job with it than VS2010 is doing, lol)</p>
