取类型数据

System.TypInfo

 

procedure TForm1.Button5Click(Sender: TObject);
var
ti: PTypeInfo;
td: PTypeData;
i: Integer;
s: string;
begin
ti := TypeInfo(TWeekDays);
td := GetTypeData(ti);
for i := td^.MinValue to td^.MaxValue do
s := s + (GetEnumName(ti, i));
ShowMessage(s);
end;

posted on 2018-05-04 11:19  疯狂delphi  阅读(131)  评论(0编辑  收藏  举报

导航