the problem is ...
in the main function, a,b,c,d,e,f arent defined, so theres an error.
if you want to use the a,b,c,d,e,f varibales that were defined in the first function (fileOpen()) then you need to define it outside the function but inside the class
i.e.
class MainClass
{
// create an char array containing grades
int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
public static void FileOpen()
{
// open the new text file
TextReader tr = new StreamReader("/Users//Desktop/Assignmenty/grades.dat");
string line;
that should do it!...
as for you 2nd question, i didnt understand you exactly, can u make it more clear