Code
//在 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;
//在 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;