Lazarus中文社区

 找回密码
 立即注册(注册审核可向QQ群索取)

QQ登录

只需一步,快速开始

Lazarus IDE and 组件 下载地址版权申明
查看: 2770|回复: 1

求一个简单自定义类的实例

[复制链接]

该用户从未签到

发表于 2011-9-23 10:30:09 | 显示全部楼层 |阅读模式
RT..求实例
回复

使用道具 举报

该用户从未签到

发表于 2011-10-8 22:20:25 | 显示全部楼层
type
    TMyClass = class(TObject)
    private // self access only
        FSomeVar: Integer;
    public // access by anything
        constructor Create; overload;
        constructor Create(Args: array of Integer); overload;
        destructor Destroy; override;
        function GetSomeVar;
        procedure SetSomeVar(newvalue: Integer);
    published // special type of public scope
        property SomeVar: Integer read GetSomeVar write SetSomeVar default 0;
    end;
回复 支持 反对

使用道具 举报

*滑块验证:

本版积分规则

QQ|手机版|小黑屋|Lazarus中国|Lazarus中文社区 ( 鄂ICP备16006501号-1 )

GMT+8, 2025-5-3 08:38 , Processed in 0.026241 second(s), 10 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表