zoukankan      html  css  js  c++  java
  • 重载

     1 using System;
     2 using System.Collections.Generic;
     3 using System.Linq;
     4 using System.Text;
     5 using System.Threading.Tasks;
     6 
     7 namespace kk5
     8 {
     9   public   class SS
    10     {
    11       public SS(int sheng) 
    12       {
    13           this.Sheng = sheng;
    14           Console.WriteLine("生命值"+ sheng);
    15       }
    16       public SS(int jj,int zhan,int zhi)
    17       {
    18           this.Zhan = zhan;
    19           this.Zhi = Zhi;
    20           this.Jj = jj;
    21           Console.WriteLine("级别" + jj);
    22       }
    23 
    24       public int Sheng { get; set; }
    25       public int Jj { get; set; }
    26       public int  Zhan { get; set; }
    27       public int  Zhi { get; set; }
    28     }
    29 }
    View Code
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace kk5
    {
        class Program
        {
            static void Main(string[] args)
            {
                SS s = new SS(1000);
                SS ss = new SS(100,111,999);
            }
            
        }
    }
  • 相关阅读:
    docker入门
    初级排序算法1-定义排序规则
    Lambda入门
    mac编辑器vim美化
    SSM搭建
    Memcached安装教程及使用
    lombok
    立个Flag-第一天
    等高线自适应分割
    wpf软件模拟鼠标键盘操作
  • 原文地址:https://www.cnblogs.com/nancheng/p/6676009.html
Copyright © 2011-2022 走看看