title: LINQ loop through a collection and append an increment to matching values
body: <p>If I had a collection like :</p>
  
  <pre><code>var list = new List&lt;string&gt;()
      {
          "one",
          "one",
          "two",
          "two",
          "three"
      };
  </code></pre>
  
  <p>is it possible to get a result like below using linq?</p>
  
  <p>"one-1", "one-2", "two-1", "two-2", "three"</p>
  
  <p>I am trying to get duplicate values and append consecutive numbers to them to make them unique</p>
  
  <p>|EDIT</p>
  
  <p>I did this in LinqPad, seems right...</p>
  
  <pre><code>Dictionary&lt;string,string&gt; names = new Dictionary&lt;string,string&gt;(){
  
      {"val1","text1"},
      {"val2","text1"},
      {"val3","text2"},
      {"val4","text3"},
      {"val5","text3"}
  
  };
  
  var filteredNames = names.GroupBy (x =&gt; x.Value).ToDictionary(x =&gt; x.Key, x =&gt; x.Select((i, index) =&gt; i.Value + index.ToString()));
  </code></pre>
  
  <p>advice welcome!</p>