title: What's the difference between double quotes and single quote in C#?
body: <p>What's the difference between double quotes and single quote in C#?</p>
  <p>I coded a program to count how many words are in a file</p>
  <pre><code>using System;
  using System.IO;
  namespace Consoleapp05
  {
      class Program
      {
          public static void Main(string[] args)
          {
              StreamReader sr = new StreamReader(@&quot;C:\words.txt&quot;);
              string text = sr.ReadToEnd();
              int howmany = 0;
              int howmany2 = 0;
  
              for(int i = 0; i &lt; text.Length; i++)
              {
                  if(text[i] == &quot; &quot;)
                  {
                  howmany++;
                  }
              }
              howmany2 = howmany + 1;
              Console.WriteLine(&quot;It is {0} words in the file&quot;, howmany2);
              Console.ReadKey(true);
          }
      }
  }
  </code></pre>
  <p>This gives me an error because of the double quotes. My teacher told me to use single quote instead, but he didn't tell me why. So what's the difference between double quotes and single quote in C#?</p>