zoukankan      html  css  js  c++  java
  • C#抽象类

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    //抽象类的一个实例
    namespace Abstruct
    {
        abstract class Abclass
        { 
            public void IdentifyBase()
            {
                Console.WriteLine("I am  AbClass!");
            }
            abstract public void IdentifyDerived();
        }
        class DerivedClass :Abclass
        {
            override public void IdentifyDerived()
            {
                Console.WriteLine("I Am  DerivedClass");
            }
        }
        class Program
        {
            static void Main(string[] args)
            {
                DerivedClass dc = new DerivedClass();
                dc.IdentifyBase();
                dc.IdentifyDerived();
                Console.ReadKey();
            }
        }
    }
  • 相关阅读:
    python 获取当前时间
    PHP基础
    python 编码
    系统分区表 MBR GPT
    python mysql like查询的写法
    JSP JavaBean
    jsp MVC
    python 正则例子
    Java版A星算法
    linux 部署subversion独立服务器
  • 原文地址:https://www.cnblogs.com/sulong/p/4793855.html
Copyright © 2011-2022 走看看