//在 type 区写入:
TMyClass = class
property s: string;
end;
//然后把光标放在其中,执行 Ctrl+Shift+C,可以自动生成以下代码:
TMyClass = class
private
Fs: string;
procedure Sets(const Value: string);
published
property s: string read Fs write Sets;
end;
{ TMyClass }
procedure TMyClass.Sets(const Value: string);
begin
Fs := Value;
end;
时间: 2024-10-29 20:58:51