title: String Format and Building Strings with "+"
body: <p>I want to ask what peoples thoughts are about writing strings and if there is a massive difference on performance when building a string.</p>
  
  <p>I have always been told in recent years to never do the following:</p>
  
  <pre><code>string dogName = "Ralph";
  DateTime bornDate = DateTime.Parse("2010-01-01");
  
  string fullText = "I am a Dog and my name is " + dogName + " and i was born on the " + bornDate.ToString("dd/MM/yyyy");
  </code></pre>
  
  <p>And always told to something similar as below.</p>
  
  <pre><code>string dogName = "Ralph";
  DateTime bornDate = DateTime.Parse("2010-01-01");
  
  string fullText2 = String.Format("I am a Dog and my name is {0} and i was born on the {1:dd/MM/yyyy}", dogName, bornDate);
  </code></pre>
  
  <p>I see the reason for using the later statement, but does anyone know what type of performance issues there are with the first one.</p>
  
  <p>And with the StringBuilder Object instead of using</p>
  
  <pre><code>string str = "Adding this comment to the string\n"
  str += "Then Add this line";
  </code></pre>
  
  <p>and using the following:</p>
  
  <pre><code>StringBuilder sb = new StringBuilder();
  
  sb.AppendLine("Add This Comment");
  sb.AppendLine("Then add this comment");
  
  string output = sb.ToString();
  </code></pre>
  
  <p>I have a handful of developers in my team at work that are a bit old school VB6 programmers and i want to explain to them why it a bad idea.</p>
  
  <p>They do the Initial code example constantly for In Code SQL Statements.</p>
  
  <p>If it is of course :)</p>