delphi泛型实现的变体记录
type TRes = record //公共的JSON回复 status: Integer; message: string; exception: string; end; TData<T: record> = record data: array of T; end; TDatas<T: record> = record res: TRes; data: array of T; end; type //定义 数据模型 Tdanwei = record unitid: string; unitname: string; end; var dw: TData<Tdanwei> := TSerial.unmarshal<TData<Tdanwei>>(TStream(req.Body));
标签:end,string,delphi,record,泛型,变体 From: https://www.cnblogs.com/hnxxcxg/p/17641421.html