title: Testing for repeated characters in a string
body: <p>I'm doing some work with strings, and I have a scenario where I need to determine if a string (usually a small one &lt; 10 characters) contains repeated characters.</p>
  
  <pre><code>`ABCDE`  // does not contain repeats 
  `AABCD`  // does contain repeats, ie A is repeated
  </code></pre>
  
  <p>I can loop through the string.ToCharArray() and test each character against every other character in the char[], but I feel like I am missing something obvious.... maybe I just need coffee. Can anyone help?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>The string will be sorted, so order is not important so  ABCDA => AABCD</p>
  
  <p>The frequency of repeats is also important, so I need to know if the repeat is pair or triplet etc. </p>