title: What is the most efficient way to detect if a string contains a number of consecutive duplicate characters in C#?
body: <p>For example, a user entered "I love this post!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"</p>
  
  <p>the consecutive duplicate exclamation mark "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" should be detected.</p>