Exemple #1
0
        static void Main(string[] args)
        {
            myclass ob1 = new myclass();
            myclass ob2 = new myclass();

            ob1.set_a(10);
            ob2.set_a(99);
            Console.WriteLine("Gia tri a cua doi tuong ob1: {0}", ob1.get_a());
            Console.WriteLine("Gia tri a cua doi tuong ob2: {0}", ob2.get_a());
            Console.ReadLine();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            // khai bao cac doi tuong moi
            myclass ob1 = new myclass();
            myclass ob2 = new myclass();

            ob1.set_a(10);
            ob2.set_a(99);

            Console.WriteLine("gia tri a cua ob1: {0}", ob1.get_a());
            Console.WriteLine("gia tri a cua ob12: {0}", ob2.get_a());
            Console.ReadLine();
        }