title: Correct way to escape characters in a DataTable Filter Expression
body: <p>I would like to know if there is a function to correctly escape string literals for filter expressions. e.g.:</p>
  <pre><code>DataTable.Select(String.Format(&quot;[name] = '{0}'&quot;, MyName))
  </code></pre>
  <p>If MyName contains ' or a number of other key characters an exception is generated. The <a href="http://msdn.microsoft.com/en-us/library/system.data.datacolumn.expression.aspx" rel="nofollow noreferrer">Microsoft documentation</a> indicates that these charaters should be correctly escaped, however there is a bit of confusion on how this is to be done.</p>
  <p>I have tried replacing ' with ' and also ['] as indicated in the documentation, however the query still fails.</p>