animal.cs

来自「大话设计模式源码bigtalkdesignpattern_src」· CS 代码 · 共 39 行

CS
39
字号
using System;
using System.Collections.Generic;
using System.Text;

namespace 动物练习
{
class Animal
{
    protected string name = "";
    public Animal(string name)
    {
        this.name = name;
    }
    public Animal()
    {
        this.name = "无名";
    }

    protected int shoutNum = 3;

    public int ShoutNum
    {
        get
        {
            return shoutNum;
        }
        set
        {
            shoutNum = value;
        }
    }

    public virtual string Shout()
    {
        return "";
    }
}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?