title: Find the first non-repeated character in a string using C#
body: <p>I am working to solve this problem. I have to find the first nonrepeated character in a string. </p>
  
  <p>For example, 
        Input : “teeter”
        Output: r </p>
  
  <p>I am going to first use HashTables : </p>
  
  <pre><code>class Program
  {
      static void Main()
      {
          var inputString =  “teeter” ;
          Hashtable hashtable = new Hashtable();
          int numb = 1; 
          for (int i=0; i&lt; inputString.length(); i++)
          {   
               if (!hashtable.ContainsKey(hashtable[i])) 
                   hashtable.Add(hashtable[i], numb);
               else  
                   hashtable[hashtable[i]] = hashtable[i].Value+ 1 ;
          }
      }
  }
  </code></pre>
  
  <p>Can I solve this problem using LinQ:</p>
  
  <pre><code>numb = inputString.First(1 == inputString.Where(item =&gt; 
                                item == hashtable[i]).Count());
  </code></pre>
  
  <p>My questions are : </p>
  
  <p>-I have to solve this problem using LINQ and using HashTables or Dictionaries. Does my solutions ture ? </p>