title: How to read into a Decimal Array C#
body: <p>Am currently doing a assignment for UNI and am quite confused about how to 
  get the content of my Text file into a Decimal/Double Array.</p>
  
  <p>The question it self asks this-
  "A computer program is required to read 12 scores (decimal numbers) from a data file, store them in an array, and calculate the average of the middle 10 scores. That is, the highest and lowest of the 12 scores are not to be included in the avg calculation."</p>
  
  <p>I have given it my best shot but come up short, I don't know how to fix this error
  "cannot implicitly convert string[] to decimal[]" I believe this is because I'm using File.ReadAllLines which I think is only applicable with strings.</p>
  
  <pre><code>using System.IO;
  
  namespace ConsoleApplication9
  {
      class Program
      {
          static void Main(string[] args)
          {
              Decimal[] Score = File.ReadAllLines("Scores.txt");
              Decimal max = Score.Max();
              Decimal min = Score.Min();
              Console.WriteLine(max + min);
              Decimal sum = Score.Sum();
              for (int index = 0; index &lt; Score.Length; index++)
              {
                  Console.WriteLine(Score[index]);
              }
              Console.ReadKey();      
  
  
              }
      }
  }
  </code></pre>
  
  <p>Hope you can help. 
  P.S. There is only numbers inside the text file.</p>