zoukankan      html  css  js  c++  java
  • 子类继承父类有参的构造函数

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

    namespace WebApplication1
    {
        public class Car
        {
            private string name;

            public string Name
            {
                get { return name; }
                set { name = value; }
            }
            public Car(string name)
            {
                this.Name = name;
            }
        }
        public class SmallCar : Car
        {
            public SmallCar(string aa)
                : base(aa)
            {
                this.Name = aa;
            }
        }
    }
  • 相关阅读:
    Mysql基础
    Mysql基础2
    Windows CMD命令大全
    python 调试方法
    LDAP
    Linux 内核与模块调试
    Linux tee命令
    Linux kgdb命令
    OpenSSL基础知识
    Linux top命令
  • 原文地址:https://www.cnblogs.com/lilyzhang/p/1584480.html
Copyright © 2011-2022 走看看