1. 程式人生 > >取類型數據

取類型數據

str string info obj AR var RoCE type ssa

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;

取類型數據