animal.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace work106
{
    public class Animal
    {
        public virtual string Name
        {
            get;
            set;
        }
    }

    //虚属性
    public class People : Animal
    {
        public override string Name
        {
            get
            {
                return base.Name;
            }
            set
            {
                base.Name = value;
            }
        }
    }
}