class Program
   {
       static void Main(string[] args)
       {
           Cat c = new Cat { Age = 1, Name = "asdf" };
           Console.WriteLine(c.Age +" "+c.Name );
       }
       class Cat
       {
           int age = 0;
           string name = "";
           public int Age { get { return age; } set { age = value; } }
           public string Name { get { return name; } set { name = value; } }
       }


   }

posted on 2014-05-21 13:23  子清  阅读(449)  评论(0编辑  收藏  举报