C#委托(代理)与事件知识讲解.pptVIP

  • 16
  • 0
  • 约小于1千字
  • 约 28页
  • 2020-06-12 发布于天津
  • 举报
第六章;回顾 ;目标;属性简介 3-2;属性简介 3-3;属性类型 4-1;属性类型 4-2;属性类型 4-3;属性类型 4-4;class SavingsAccount { // 类字段用于存储帐号、余额和已获利息 private int _accountNumber; private double _balance; private double _interestEarned; // 利率是静态的,因为所有帐户获得的利息相同 private static double _interestRate; // 构造函数初始化类成员 public SavingsAccount(int accountNumber, double balance) { this._accountNumber = accountNumber; this._balance = balance; } // 只读 AccountNumber 属性 public int AccountNumber { get { return _accountNumber; } };定义和调用属性 4-2;定义和调用属性 4-3;定义和调用属性 4-4;索引器;定义和调用索引器 4-1 ;定义和调用索引器 4-2;定义和调用索引器 4-3;定义和调用索引器 4-4

文档评论(0)

1亿VIP精品文档

相关文档