title: Compare List of characters in C#
body: <p>I am trying to create a method to check whether a string contains same char, followring is my code: </p>
  
  <pre><code>public char GetCommonChar(string text)
      {
          List&lt;char&gt; myList = new List&lt;char&gt;();
  
          for (int i = 0; i &lt; text.Length; i++)
          {
              myList.Add(text[i]);
          }
  
          return ' ';
      }
  </code></pre>
  
  <p>I created a list to save all characters to the list, my idea is to check whether the first index of the linst are equal with the next one, then return the character.
  My question is how to compare characters in same list? Do i need another for loop that starts from index j=1 and then compare it with the previous index in the list? or is there is any other better solution?</p>
  
  <p>Note: i dont want to use Linq</p>