What's the difference between double quotes and single quote in C#
<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(@"C:\words.txt");
      string text = sr.ReadToEnd();
      int howmany = 0;
      int howmany2 = 0;

      for(int i = 0; i &lt; text.Length; i++)
      {
       if(text[i] == " ")
       {
       howmany++;
       }
      }
      howmany2 = howmany + 1;
      Console.WriteLine("It is {0} words in the file", 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>
