title: C# list count always returns 1 even when list is empty
body: <p>I'm trying to debug a method in C# but my basic syntax skills here seem to be lacking!  The method accepts a list of dates as a comma-separated text string.  This string is converted to a list, then processed.  However, it seems that even when an empty string is passed to the method, it still outputs 1 when the list is counted.</p>
  
  <p>The code is as follows:</p>
  
  <pre><code>public static int DaysLeft(DateTime endDate, DateTime startDate, Boolean excludeWeekends, String excludeDates)
      {
          int counter = 0;
  
          List&lt;string&gt; excludeDatesList = new List&lt;string&gt;(excludeDates.Split(','));
  
          counter = excludeDatesList.Count;
  
          return counter;
      }
  </code></pre>
  
  <p>If I pass an empty string in as the excludeDates parameter, it returns 1.  If I pass a single date it returns 1.  If I pass two dates, it returns 2 etc.  So it's kind of working except where there's nothing passed in, when I'd expect it to return 0 but it actually returns 1.</p>
  
  <p>Can anyone point me in the right direction?</p>
  
  <p>Thanks</p>