Esempio n. 1
0
 public void Load()
 {
     List<CStudent> _oStudents = new List<CStudent>();
     CFile oFile = new CFile();
     string sRecords = oFile.Read();
     string[] arStudents = sRecords.Split('|');
     foreach (string sRecord in arStudents)
     {
         CStudent oStudent = new CStudent(sRecord);
         this.Add(oStudent);
     }
 }
Esempio n. 2
0
        public bool Write()
        {
            try
            {
                CFile oFile = new CFile();
                string sOutput = string.Empty;

                // TODO: Create the output stream
                FormatOutput(ref sOutput);

                // Save the output stream
                oFile.Write(sOutput);
                return true;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }