title: how do i read the first line only of a text file which contains numbers and do maths with it?
body: <p>I have a text file which contains a list of numbers. the first line is 5.5, the second line is 8 third line is 13 and so on. Each text file generates a list of number different each time but I'm only concentrating on the first line which in this case is 5.5, here is my code</p>
  
  <pre><code>                StreamReader FileFav = new StreamReader(BettingFileFav);
                  StreamReader FileOdds = new StreamReader(BettingFileOdds);
                  StreamReader FileResult = new StreamReader(BettingFileResult);
                  FavLine = FileFav.ReadLine();
                  OddsLine = FileOdds.ReadLine();
                  ResultLine = FileResult.ReadLine();
                  int BetAmount = 10;
  
                  if (FavLine.Contains("Yes"))
                  {
                      int a = Convert.ToInt16(OddsLine);
                      double c = ((double)a * BetAmount);
                      string myString = c.ToString("#.##");
                      MessageBox.Show("Won £" + myString);
                  }
                  else
                  {
                      MessageBox.Show("Lost -£" + BetAmount); 
                  }
  </code></pre>
  
  <p>the line of text it has read reads 5.5 so I am trying to get the answer 55.50.
  I get an error code </p>
  
  <blockquote>
    <p>Additional information: Input string was not in a correct format.</p>
  </blockquote>
  
  <p>I'm using the MessageBox.Show to see if it works then migrating the result to a file which I will be using later.</p>
  
  <p>Can anybody help?</p>