title: MVC C# application, put content of file into string or List<string>
body: <p>I am uploading a file into a controller using the following -</p>
  
  <pre><code>    [HttpPost]
      public ActionResult Index(HttpPostedFileBase file)
      {
          if (file.ContentLength &gt; 0)
          {
              var fileName = Path.GetFileName(file.FileName);
              var path = Path.Combine(Server.MapPath("~/App_Data/uploads"), fileName);
  
              //I want to put file contents into a string or List&lt;string&gt;
  
          }
      }
  </code></pre>
  
  <p>I would like to either put the contents of the file into a string then loop through the string which will be a delimited list, </p>
  
  <p><em>or</em> </p>
  
  <p>loop through the incoming stream itself, creating a list of strings out of it.
  I can't figure out how to do either. I assume I would use <code>file.InputStream</code> in some manner?
  Any help would be appreciated. Thanks!</p>