title: C#: Converting List of Chars to String
body: <p>I'm solving a coding challenge on Coderbyte with C# using lists. I have the desired outcome but need to return it as a string.</p>
  
  <p>I would like to know how to convert my list of chars into a string.
  Thank you in advance.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>string s = "I love dogs";
  int i, j = 0;
  List&lt;char&gt; array1 = new List&lt;char&gt;();
  List&lt;char&gt; array2 = new List&lt;char&gt;();
  
  for (i = 0; i &lt; s.Length; i++)
  {
      if (s.Length == j)
          break;
  
      if (Char.IsLetter(s[i]))
      {
          array1.Add(s[i]);
      }
      else
      {
          for (j = i; j &lt; s.Length; j++)
          {
              if (Char.IsLetter(s[j]))
              {
                  array2.Add(s[i]);
              }
              if (!Char.IsLetter(s[j]) || j == s.Length - 1)
              {
                  if (array1.Count &gt;= array2.Count)
                  {
                      array2.Clear();
                  }
                  else
                  {
                      array1.Clear();
                      array1.AddRange(array2);
                      array2.Clear();
                  }
              }
          }
      }
  } // How to convert array1 into String ?
  </code></pre>