public 中声明“property Month: Integer read GetMonth write SetMonth;”是什么意思?
特别是那个read 和write

解决方案 »

  1.   

    是不是设置 读取和写入property month值的 方法的固定写法?
      

  2.   

    差不多是固定的,看一下Delphi的语法书,大概明白了。
      

  3.   

    property Month: Integer read GetMonth write SetMonth
    property 声明属性
    Month: Integer 这个属性是Integer
    read 表示读,如果你要取得这个属性,就支调用GetMoth这个函数
    write 同上,只是表示写
      

  4.   

    得到或者写入month属性值得时候是不是只能通过定义得方法,还是只是对于定义范围以外的类应用这种方法读取和写入month值得?