⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 programmer.cs

📁 东软内部材料(四)asp等相关的教学案例 
💻 CS
字号:
using System;

namespace People
{
  ///<remarks>
  ///The <c>programmer</c>class defines the salient
  ///attributes of every fine programmer.
  ///<seealso cref="Person">Inherits from person</seealso>
  ///</remarks>

  public class Programmer : Person
  {
    private int _avgHoursSleepPerNight;

    ///<summary>Default constructor</summary>
    public Programmer(): base()
    {
    }

    ///<summary>Constructor using first and last names</summary>
    ///<param name="firstName">The first name of the programmer</param>
    ///<param name="lastName">The last name of the programmer</param>
    ///<seealso cref="string"/>
    public Programmer(string firstName, string lastName): base(firstName, lastName)
    {
    }

    ///<summary>Constructor using first and last names and
    ///the hours of sleep</summary>
    ///<param name="firstName">The first name of the programmer</param>
    ///<param name="lastName">The last name of the programmer</param>
    ///<param name="hoursSleep">The average number of hours of sleep</param>
    ///<seealso cref="string"/>
    ///<seealso cref="int"/>
    public Programmer(string firstName, string lastName, int hoursSleep): base(firstName, lastName)
    {
      _avgHoursSleepPerNight = hoursSleep;
    }

    ///<value>Defines the average number of hours of sleep.</value>
    public int AvgHoursSleepPerNight
    {
      get { return _avgHoursSleepPerNight; }
      set { _avgHoursSleepPerNight = value; }
    }
  }

}

⌨️ 快捷键说明

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