title: Getting error trying to use array index in my lists
body: <p>I m posting few code here for you to see, the error is on names[] </p>
  
  <pre><code>var names = new Lists&lt;string&gt;();
  while(true)
   {
  
              Console.Write("type a name (or hit ENTER to quit)");
              var input = Console.ReadLine();
              if (string.IsNullOrWhiteSpace(input))
              break;
            names.Add(input);
    }
  
    if (names.count &gt;2)
              Console.WriteLine("{0} {1} and {2} others like your posts", names[0], names[1], names.count - 2);}
  }
  }
  </code></pre>
  
  <p>I am having an error on names[0], names[1], saying cannot apply indexing with[] to an expression of <code>list&lt;string&gt;</code>.</p>