title: Find every same letters in a word
body: <p>I'm working on a Hangman project that requires me to change characters "-" to "a to z". Since I'm learning how to code with C#, I have no clue how to do it.
  I obviously need to use position because of the case where the word as duplicated letters (EX.: C <strong>oo</strong> kies)</p>
  
  <p>Here's the code I developed, it makes my thing crashes and it's obviously incomplete.</p>
  
  <pre><code>    private void chkA_Checked(object sender, RoutedEventArgs e)
      {
          if (motRechercher.Contains("a"))
          {
              int indexDemotRechercher = motRechercher.IndexOf("a");
              int k = indexDemotRechercher;
              var StringBuilderOP = new StringBuilder(motRechercher);
              StringBuilderOP.Remove(indexDemotRechercher, indexDemotRechercher);
              StringBuilderOP.Insert(k, "A");
          }}
  </code></pre>
  
  <p>motRechercher is a STRING that I can use everywhere that I randomly pick from a list of 27 words. If this bother, it's a check-box and where I write the text is a Text-box(called txtMot).
  Feel free to use other variables, I'll re-adapt after for my own comprehension. I would just like some explanation/examples to help my learning experience.</p>
  
  <p>Here is the code of the randomiser if you really feel like this can help you understand[It works] :</p>
  
  <pre><code>        private void btnDemarrer_Click(object sender, RoutedEventArgs e)
      {
       Random rdn = new Random();
       int nbreAleatoire = rdn.Next(0, 27); 
       motRechercher = lesMots[nbreAleatoire];
              if (motRechercher.Length &gt; 0)
              {
              String str = new String('-', motRechercher.Length);
              txtMot.Text = str;
              }
      }
  </code></pre>
  
  <p>QUESTION : How do I make a thing that detects duplicate and that will change the "-" to "a-z"?</p>
  
  <p>Ask questions and I'll try to answer them if you think it's unclear.</p>