title: Why does String.Split() not allow a single string as a parameter
body: <p>I am trying to write one of my first c# scripts for a homeautomation solution (homeseer). I have other issues to resolve with the below code, however the simple line:</p>
  
  <pre><code>String[] parm = line.Split(",");
  </code></pre>
  
  <p>Results in the error:</p>
  
  <blockquote>
    <p>Type 'string' does not contain a definition for `Split' and no
    extension method 'Split' of type 'string' could be found (are you
    missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>I will post another question for my other issues</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  
  public void Main(string line)
  {
      String[] parm = line.Split(",");
      var windowDoorOpenVar = hs.GetVar("WindowDoorOpen");
      if (windowDoorOpenVar.Size == 0 || windowDoorOpenVar == null)
      {
          hs.CreateVar("WindowDoorOpen");
          List&lt;string&gt; windowDoorOpen = new List&lt;string&gt;();
      }
      else
      {
          List windowDoorOpen = windowDoorOpenVar;
      }
  
      switch (parm[0])
      {
          case "Open":
              windowDoorOpen.Add(parm[1]);
              break;
          case "Closed":
              windowDoorOpen.Remove(parm[1]);
              break;
      }
      hs.SaveVar("WindowDoorOpen", windowDoorOpen);
  }
  </code></pre>