コード例 #1
0
 public static void Soapserial()
 {
     Student student = new Student();
     student.Name = "Ajay";
     student.RollNo = 55;
     student.TotalMarks = 50;
     student.SaveSoap("soap.bin");
     Student studentsDetails = student.LoadSoap("soap.bin");
     Console.WriteLine(studentsDetails.Name);
     Console.WriteLine(studentsDetails.RollNo);
     Console.WriteLine(studentsDetails.TotalMarks);
 }
コード例 #2
0
        public static void XmlSerial()
        {
            Student student = new Student();
            student.Name = "Ajay";
            student.RollNo = 55;
            student.TotalMarks = 50;
            Console.WriteLine(student.ReturnsGrade(student.TotalMarks));
            Console.ReadKey();
            student.saveXML("icalibrator.xml");
            Student studentsDetails = Student.LoadXML("icalibrator.xml");
            Console.WriteLine(studentsDetails.Name);
            Console.WriteLine(studentsDetails.RollNo);
            Console.WriteLine(studentsDetails.TotalMarks);

            Console.ReadKey();
        }