replace "\\' to '\' in C#
<p>I'm using PayWay payment gateway.
I want to put the pay certificate File path in the web.config file.
so I add like this</p>

<pre><code> &lt;add key="PayWayPath" value="c:\payway\ccapi.q0&amp;amp;logDirectory=c:\payway"/&gt;
</code></pre>

<p>the I call in my web form like this.</p>

<pre><code>  String initParams = WebConfigurationManager.AppSettings["PayWayPath"];
</code></pre>

<p>My initParams like this</p>

<pre><code>initParams  = c:\\payway\\ccapi.q0&amp;amp;logDirectory=c:\\payway
</code></pre>

<p>but I need to get like this output.</p>

<pre><code>initParams  = c:\payway\ccapi.q0&amp;amp;logDirectory=c:\payway
</code></pre>

<p>I try this things. But non of the work</p>

<pre><code>      initParams = initParams.Replace("\\\\", "\\");  
 initParams = Regex.Replace(initParams, @"[\\ ]", "\");
</code></pre>

<p>So how can I do it?</p>
