Finding a char from an array, spliting at that point and then inserting another char after
<p>I am basically looking for a way to check if a certain string contains any of a certain list of chars, and if contains one of these to split the string and then insert the same char infront/after it. This is because these certain chars are breaking my search when they are input due to SQL not handling them well.</p>

<p>This is how far I have actually got so far:</p>

<pre><code>string[] errorChars = new string[]
{
    "!",
    "}",
    "{",
    "'",
};

for (int i = 0; i &lt; errorChars.Count(); i++)
{
    if(fTextSearch.Contains(errorChars[i]))
    {
    }
}
</code></pre>
