예제 #1
0
파일: Program.cs 프로젝트: luikaaa27/PP2
        static void Deser()
        {
            FileStream    fs = new FileStream("ComplexNumber.txt", FileMode.Open, FileAccess.Read);
            XmlSerializer xs = new XmlSerializer(typeof(ComplexNumber));
            ComplexNumber t  = xs.Deserialize(fs) as ComplexNumber;

            t.output();
            fs.Close();
        }
예제 #2
0
파일: Program.cs 프로젝트: dokerbolov/pp2
        static void Main(string[] args)
        {
            ComplexNumber A = new ComplexNumber {
                a = 8, b = 4
            };
            ComplexNumber B = new ComplexNumber {
                a = 5, b = 3
            };
            ComplexNumber C = (A - B) * B;

            C.output();
            Deser();
            Ser(C);
        }
예제 #3
0
파일: Program.cs 프로젝트: luikaaa27/PP2
        static void Main(string[] args)
        {
            int           x = Convert.ToInt32(Console.ReadLine());
            int           y = Convert.ToInt32(Console.ReadLine());
            ComplexNumber A = new ComplexNumber {
                a = x, b = y
            };

            x = Convert.ToInt32(Console.ReadLine());
            y = Convert.ToInt32(Console.ReadLine());
            ComplexNumber B = new ComplexNumber {
                a = x, b = y
            };
            ComplexNumber C = A + B;

            C.output();
            Ser(C);
            //Deser();
        }