title: String.Substring behavior when moving a string frame k char places
body: <p>Inside a For loop I do not understand following behavior of <code>string.Substring(i,j)</code></p>
  
  <p>having the code</p>
  
  <pre><code>String line = "TTACCTTAAC";
  int k = 3; //this is variable but for simplicity is 3
  String _pattern = "";
  for (int i = 0; i &lt;= line.Length - k; i++) {
      _pattern = line.Substring(i, i + k );
      //do something...
  }
  </code></pre>
  
  <p>I am expecting the loop to walk over string Line (<code>TACCTTAAC</code>) <code>(from 0 to 10-3 = 7)</code>like:</p>
  
  <pre><code>TTA
  ACC
  CCT
  CTT
  TTA
  TAA
  AAC
  </code></pre>
  
  <p>However I get</p>
  
  <pre><code>TTA
  ACCT
  etc...
  </code></pre>
  
  <p>What am I missing?</p>