C#, replacing special character in query
<p>I have a record in a database containing special characters like <code>&amp;,'</code> (apostrophe).</p>

<p>The record look like this.. <code>stack'overflow</code>.</p>

<p>In my query I have written like this. </p>

<pre><code>where name = ' " +name+ " ' ";
</code></pre>

<p>Suppose the name is <code>stack'overflow</code> - then it gives me a syntax error.</p>

<p>How to solve it?</p>

<p>I am using C#</p>
