title: C# array of numbers
body: <p>so I have this txt file, which contains a set of various numbers.
  How to make the program read that file and show:</p>
  
  <ul>
  <li>How many numbers are in the file</li>
  <li>what is its sum / mat product</li>
  <li>Minimum/Maximum and average values</li>
  </ul>
  
  <p>so far I've got this:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.IO;
  
  namespace laboratorinis7
  {
  class Program
  {
      static void Main(string[] args)
      {
          string skaiciai = "skaiciai.txt";
          string rodymas = File.ReadAllText(skaiciai);
          Console.WriteLine(rodymas);
          Console.ReadLine();
          string[] sa1 = rodymas.Split("\r\n".ToCharArray());
  
          string[] sa2 = new string[0];
          int y = 0;
          foreach (string s in sa1)
          {
              if (s == string.Empty) continue;
              string[] t = s.Split(' ');
              for (int x = 0; x &lt; t.Length; ++x)
              {
                  Array.Resize(ref sa2, sa2.Length + 1);
                  sa2[y++] = t[x];
              }
          }
  
          foreach (string S in sa2)
          {
              Console.WriteLine(S);
          }
  
          Console.ReadLine();
      }
  }
  }
  </code></pre>
  
  <p>It displays txt file contents however, no array.</p>