title: .net core why can i get the IFormCollection by key the alone
body: <p>lets say i have an</p>
  
  <pre><code>&lt;form method="post" action"/user/create"&gt;
      &lt;input type="text" name="FirstName" placeholder="FirstName" /&gt;
      &lt;button type="submit"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I want to access my input value FirstName in my action method.</p>
  
  <pre><code>public IActionResult Create(IFormCollection form)
  {
      string FirstName = form.Keys["FirstName"];
      return View();
  }
  </code></pre>
  
  <p>It giving an error "Cannot apply indexing with [] to an expresion of type ICollection "</p>
  
  <p>I know i can iterate and put a if statement but I found that takes so much code. I just started learning c# but in Node.js and Python its so easy to get form post values, for example in node.</p>
  
  <pre><code>request.body.FirstName;
  </code></pre>
  
  <p>Thats it. I'm looking for something similar without that iteration or creating a poco class.</p>
  
  <p>thanks.</p>