How to determine if string contains specific substring within the first X characters
<p>I want to check that Value1 below contains abc but only within the first X characters, how would you write the if statement to check for this?</p>

<pre><code>var Value1 = "ddabcgghh";

if (Value1.Contains("abc"))
   {
       found = true;
   }
</code></pre>

<p>It could be within the first 3, 4 or 5 characters.</p>
