I have a list. The first entry is a string, and the other three are integers. I need to store the first entry as a string and the other three as int's. Any help would be appreciated.
using System;
using System.Collections.Generic;
using System.IO;
class Program
{
static void Main()
{
//
// Read in a file line-by-line, and store it all in a List.
//
List<string> list = new List<string>();
using (StreamReader reader = new StreamReader("grades.txt"))
{
string line;
while ((line = reader.ReadLine()) != null)
{
list.Add(line); // Add to list.
Console.WriteLine(line); // Write to console.
}
}
}
}