本帖最后由 秦二江 于 2013-3-14 18:42 编辑  
 
static void Main(string[] args) 
        { 
            // 实例化对象 
            person a=new person() ; 
            // 非静态方法 实例名.方法名  
             a.Play (); 
            string str= a.Sound(); 
            Console.WriteLine(str); 
            Console.ReadKey(); 
        } 
        
         
    } 
    public abstract class Animal 
    { 
        public abstract string Sound(); //创建抽象方法 
        public void Play() // 创建非静态普通方法 
        { 
            Console.WriteLine (); 
        } 
    } 
    public class person :Animal  
    { 
        // 抽象方法 必须在 子类中实现 
        public override string Sound() 
        { 
            string str="I like music"; 
            return str; 
        } 
    } 
 |