title: String.Format in foreach loop for printing in the same line
body: <p>I have a function with which I read a Json and deserialize it. The JSON is nested and what I want is to print some nested values in the same line. </p>
  
  <p>My JSON is that:</p>
  
  <pre><code>{
  "number": 123,
  "person": [{
      "phone": 864556,
      "name": "John D",
      "address": "N.Y",
      "email": "test@test.com"
  },
  {
      "phone": 19845,
      "name": "Mary S",
      "address": "N.Y",
      "email": "testmary@test.com"
  },
  {
      "phone": 34936,
      "name": "Alex N",
      "address": "Santiago",
      "email": "alex@test.com"
  },
  {
      "phone": 197478,
      "name": "Bill McK",
      "address": "London",
      "email": "test@example.com"
      }]
   }
  </code></pre>
  
  <p>and I have this </p>
  
  <pre><code>foreach (var num in JMain.person)
  {
        debugOutput(String.Format("&lt;{0};&gt;", num.phone));
  }
  
  private void debugOutput(string strDebugText)
      {
          try
          {
              outPut += strDebugText + Environment.NewLine;
              System.Diagnostics.Debug.Write(strDebugText + Environment.NewLine);
  
          }
          catch(Exception ex)
          {
              System.Diagnostics.Debug.Write(ex.Message.ToString() + Environment.NewLine);
          }
      }
  </code></pre>
  
  <p>where debugOutput is the function in which I read the JSON and print it. What I want is to print all the phones in one line. With for loop and String.Format I can print them one down the other. Maybe isn't right to use String.Format and there is another way?</p>
  
  <p>Thank you</p>