Im trying to pass a filename parameter from the function to the main functio:
Im failing horribly I need some direction.
Code:
using System;
using System.Text;
using System.IO;
namespace Reaingthingyiles
{
class program{
public static void checkit(StreamReader file)
{
StreamReader thingy = new StreamReader(thingy);
while(!thingy.EndOStream)
{
string line = thingy.ReadLine();
Console.WriteLine(line);
}
}
static void Main()
{
checkit(new StreamReader (@"data.txt"));
}
}
}
Comment