Exemple #1
0
        static void Main()
        {
            TextData db = new TextData();
            Email2   em = new Email2();
            Interest vi = new Interest();

            db.filename = @"c:\data\data.txt";
            db.openData();
            vi.setRate(10);
            vi.time = 1;
            Console.WriteLine(vi.getRate());
            while (!db.eof)
            {
                em.email = db.getColumn(1);
                //vi.setData(db.getColumn(2), 0.1, 1);
                vi.amount = Convert.ToDouble(db.getColumn(2));
                Console.WriteLine(db.getColumn(0));
                Console.WriteLine(db.getColumn(1));
                Console.WriteLine(db.getColumn(2));
                Console.WriteLine(em.getName());
                Console.WriteLine(em.getDomain());

                Console.WriteLine("=================");
                db.moveNext();
            }
            Console.ReadKey();
        }
Exemple #2
0
        static void Main()
        {
            Email2 v = new Email2(); // เรียก function

            v.email = "*****@*****.**";
            Console.WriteLine(v.getName());
            Console.WriteLine(v.getDomain());
            Console.WriteLine(v.getLenght());
            Console.ReadKey();
        } //method main