title: System.Array' does not contain a definition for 'Count'
body: <p>In my C# Project, I am getting this error that the definition for count does not contain <code>System.Array</code> </p>
  
  <pre><code>protected void Page_Prerender(object sender, EventArgs e)
  {
      FileInfo[] fileInfo;
      string UpFolder = Server.MapPath("~/data/images/");
      DirectoryInfo dir = new DirectoryInfo(UpFolder);
      fileInfo = dir.GetFiles();
      // here i am getting error
      int TotalImages = fileInfo.Count();
      for (int count = 0; count &lt; TotalImages; count++)
      {
          Image image = new Image();
          image.ImageUrl = "~/data/images/" + fileInfo[count].ToString();
          image.ID = count.ToString();
          DataListImage.Controls.Add(image);
      }
      DataListImage.DataSource = dir.GetFiles();
      DataListImage.DataBind();
  
      string UpFolder1 = Server.MapPath("~/data/thumbnails/");
      DirectoryInfo dir1 = new DirectoryInfo(UpFolder1);
      DataListthumbnails.DataSource = dir1.GetFiles();
      DataListthumbnails.DataBind();
  }
  </code></pre>