Eso, necesito leer y guardar cada linea de un archivo .txt en una nueva variable.
Estoy probando algo como...
int counter = 0;
string line;
// Read the file and display it line by line.
System.IO.StreamReader file =
new System.IO.StreamReader("c:\\carpeta\\txt\\user_data.txt");
while ((line = file.ReadLine()) != null)
{
Console.WriteLine(line);
counter++;
}
file.Close();
// Suspend the screen.
Console.ReadLine();
¿ Como guardo el valor de las lineas 1 y 2 en variable1 y variable2 ?