netattributes.dpr
来自「Delphi7从入门到精通及附书源码 Delphi7从入门到精通及附书源码」· DPR 代码 · 共 38 行
DPR
38 行
program NetAttributes;
uses
Borland.Delphi.SysUtils;
type
TMyCustomAttribute = class(TCustomAttribute)
private
FAttr : Integer;
public
constructor Create(val: Integer);
property customAttribute : Integer read FAttr write FAttr;
end;
constructor TMyCustomAttribute.Create(val: Integer);
begin
inherited Create;
customAttribute := val;
end;
type
[TMyCustomAttribute(17)]
TFoo = class
public
Data : Integer;
end;
var
Foo: TFoo;
begin
Foo := TFoo.Create;
Foo.Data := 100;
writeln ('hi, there');
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?