title: CsvHelper how to filter a column and return only distinct values
body: <p>I am using CsvHelper in C#. I want to filter my ORIGTITLE column for distinct values and store those in the Dictionary collection. So in my Dictionary collection I should have the values below. How can I accomplish this ?</p>
  
  <blockquote>
    <p>[Abbrechen,Ab]  [Abgleichen,translate1] [Abgrenzung,Something]
    [Tree,Baum]</p>
  </blockquote>
  
  <p>My .csv file looks like this:</p>
  
  <pre><code>ORIGTITLE;REPLACETITLE;ORIGTOOLTIP
  Abbrechen;Ab;Abbrechen
  Abbrechen;Abort;abgelaufen
  Abgleich;translate1;
  Abgrenzung;Something;Abgrenzung zum Konto
  Tree;Baum;Baum
  Tree;Leaf;Baum
  </code></pre>
  
  <p>Here is my C# code so far: </p>
  
  <pre><code>class DataRecord
  {
      public string ORIGTITLE { get; set; }
      public string REPLACETITLE { get; set; }
      public string ORIGTOOLTIP { get; set; }
  }
  
  public void CsvReader()
      {
          using (StreamReader streamReader = new StreamReader(@"C:\Users\Devid\Desktop\Newtest.txt"))
          {
              CsvReader reader = new CsvReader(streamReader);
              reader.Configuration.Encoding = Encoding.UTF8;
              reader.Configuration.Delimiter = ";";
              List&lt;DataRecord&gt; records = reader.GetRecords&lt;DataRecord&gt;().ToList();
  
              //records has to be a distinct list
  
              Dictionary&lt;string, string&gt; dict = new Dictionary&lt;string, string&gt;();
  
              foreach (DataRecord record in records)
              {
                  dict.Add(record.ORIGTITLE, record.REPLACETITLE);
                  //i get a error because the key is not distinctq
              }
          }
      }
  </code></pre>