title: Count the Number of elements in a string Array c#
body: <p>I am reading in data from a file into a list.  Once I have the data read in, I would like to split every string, and display the length of the split string. I have tried string.Length and string.Count, but nothing works.  How can I find the number of elements in my split string?</p>
  
  <p>Here is the section of relevant code:</p>
  
  <pre><code>string fileread = openFileDialog1.Filename; //Opens file from computer
  lines = System.IO.File.ReadAllLines(fileread);
  foreach (string line in lines)
  {
      string[] Data_array = line.Split(',');
      List&lt;string&gt; Data_list = new List&lt;string&gt;();
      Data_list.Add(line);
      lbl_datacolumns.Text = Data_array.Count;//should show number of elements in Data_array
  }
  </code></pre>
  
  <p>The error is: "Cannot Convert method group 'Count; to non-delegate type 'string'</p>