property
来源:互联网 发布:js读取本地json文件 编辑:程序博客网 时间:2024/06/09 14:08
interface
type
TPerson = class(TObject)
private //私有域
FName: string;
FAge: Integer;
procedure SetName(const strName: string);
procedure SetAge(const intAge: Integer);
public //公有域
property Name: string read FName write SetName;
property Age: Integer read FAge write SetAge;
end;
TPerson = class(TObject)
private //私有域
FName: string;
FAge: Integer;
procedure SetName(const strName: string);
procedure SetAge(const intAge: Integer);
public //公有域
property Name: string read FName write SetName;
property Age: Integer read FAge write SetAge;
end;
implementation
{ TPerson }
procedure TPerson.SetName(const strName: string);
begin
FName := strName;
end;
begin
FName := strName;
end;
procedure TPerson.SetAge(const intAge: Integer);
begin
if intAge < 0 then FAge := 0 else FAge := intAge;
end;
begin
if intAge < 0 then FAge := 0 else FAge := intAge;
end;
- property
- property
- Property
- @property
- @property
- property
- @property(..,..)
- property
- @property
- property
- property
- @property
- property()
- @property
- property
- @property
- property
- @property
- C程序设计语言整理笔记(三)控制流
- Android实现通用的ActivityGroup(效果类似Android微博客户端主界面),强烈建议不要再使用TabActivity
- TWiki安装配置
- UML发展现状与实际应用——希赛嘉宾聊天实录
- 落伍了落伍了,竟然不知道 pinterest和 Tumblr
- property
- oracle_看韩老师视频学游标
- HDU 4289 Control(拆点,最大流)
- 设计代码之虚析构函数
- Java中防止内存泄露
- Android GridView组件的使用
- CF #99 div1 A.Literature Lesson
- java 三种读取配置文件的方式
- SVN 服务器发送了意外的返回值(405 Method Not Allowed),在响应 “MKCOL” 的请求