刚好碰到 ,顺便试了下,有需要的朋友可以看看。 uses TypInfo; type
TOrderType = (otFN,otGR,otSZ); var pi:PTypeInfo; i:Integer; ot:TOrderType; s:String; pi:= TypeInfo(TOrderType); with GetTypeData(pi)^ do begin for i := MinValue to MaxValue do begin s := GetEnumName(pi,i); case TOrderType(GetEnumValue(pi,s)) of otFN : ShowMessage('otFN'); otGR: ShowMessage('otGR'); otSZ: ShowMessage('otSZ'); end; end; end; end; |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论