title: How can I concatenate a text capitalized by a foreach loop in C#?
body: <pre><code>using System;
  
  class Program{
    public static void Main (string[] args){
      string Text = &quot;the sentence which each word must be capitalized&quot;;
      string[] WordArray = new string[8];
  
      foreach (string Word in Text.Split(' ')){
        string CapitalizedFirstLetter = Word.Substring(0, 1).ToUpper();
        string RestOfWord = Word.Substring(1, Word.Length-1);
        string ConcatenatedWord = string.Concat(CapitalizedFirstLetter, RestOfWord);
      }
    }
  }
  </code></pre>
  <p>I was planning to capitalize each words and concatenate it again but, I cannot concatenate it.
  How should I concatenate it?</p>