Пример #1
0
        static void Main(string[] args)
        {
            PropertiesDemo p = new PropertiesDemo();

            p.Name = "Jaseem";
            p.Age  = 23;

            PropertiesDemo d = new PropertiesDemo();

            d.Name = "Mr.X";
            d.Age  = -1;

            Console.WriteLine("{0} : {1}", p.Name, p.Age);
            Console.WriteLine("{0} : {1}", d.Name, d.Age);
            Console.ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            PropertiesDemo p = new PropertiesDemo();

            p.Name = "Vinayak";
            p.Age  = 23;

            PropertiesDemo d = new PropertiesDemo();

            d.Name = "Abhishek";
            d.Age  = -1;

            Console.WriteLine("{0} : {1}", p.Name, p.Age);
            Console.WriteLine("{0} : {1}", d.Name, d.Age);
            Console.ReadLine();
        }