      private void button3_Click(object sender, EventArgs e)
        {
            input = new FileStream("Student.rnd", FileMode.Open, FileAccess.Read);
            binaryInput = new BinaryReader(input);
            double sum = 0;
            int count = 0;
            listBox1.Items.Clear();
            listBox1.Items.Add("List of students : ");
            for (int i = 0; i < Max_Number ; i++)
            {

                input.Seek((i) * randomAccessRecord.SIZE, 0);
                record.StNo = binaryInput.ReadInt32();
                record.fName = binaryInput.ReadString();
                record.lName = binaryInput.ReadString();
                record.Grade = binaryInput.ReadDouble();
                if (record.StNo != 0)
                {
                    sum += record.Grade;
                    count++;
                    string result = record.StNo.ToString() + "\t" + record.fName + "\t" + record.lName + "\t" + record.Grade.ToString();
                    listBox1.Items.Add(result);
                }
            }
            listBox1 .Items .Add ("====================================");
            listBox1 .Items .Add ("Average is: " + Convert.ToString((sum / count)));
        }