title: How do I read and separate the first portion of the array from the rest?
body: <p>So I have a minor problem with my code and am almost certain that it should be an easy fix. So I have some data that I have in a file that reads:</p>
  
  <pre><code>25 150
  60
  63
  61
  70
  72
  68
  66
  68
  70
  </code></pre>
  
  <p>The problem with this bit of data is that the first line: "25 150", are suppose to be saved as integers so that I can use them throughout the code. I have the problem solved without that line of numbers because the array can separate them as it normally does. How do I write the code so that it separates those two numbers and saves them as two different integers? This is the code I have so far:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.IO;
  
  namespace proj11LEA
  {
      class Program
      {
          const int SIZE = 50;
  
          static void Main(string[] args)
          {
              int[] volts = new int[SIZE];
  
              string environment = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "\\";
  
              Console.WriteLine("\nResistor Batch Test Analysis Program\n");
              Console.WriteLine("Data file must be in your Documents folder.");
              Console.WriteLine("Please enter the file name: ");
              string input = Console.ReadLine();
  
              string path = environment + input;
  
              StreamReader data = new StreamReader(path);
              string fromFile;
              int count = 0;
              int start = 1;
  
              Console.WriteLine("\nRes#\tDissipation\tPassed");
  
              do
              {
                  fromFile = data.ReadLine();
                  if (fromFile != null)
                  {
                      string[] dataArray = fromFile.Split();
                      volts[count] = int.Parse(dataArray[0]);
                      count++;
                  }
              } while (fromFile != null);
  
              for (int i = 0; i &lt; count; i++ )
              {
                  int diss = (volts[i] * volts[i])/25;
                  if (diss &gt;= 150)
                  {
                      string answer = ("yes");
                      Console.WriteLine("{0}\t{1:d2}\t\t{2}", start++, diss , answer);
                  }
                  else
                  {
                      string answer = ("no");
                      Console.WriteLine("{0}\t{1:d2}\t\t{2}", start++, diss, answer);
                  }
              }
              Console.ReadLine();
          }
      }
  }
  </code></pre>