delphi泛型实现的变体记录
delphi泛型实现的变体记录
model+泛型真的是无敌存在。
type TRes = record //公共的JSON回复 status: Integer; message: string; exception: string; end; TData<T: record> = record data: array of T; end; type //定义 数据模型 Tdanwei = record unitid: string; unitname: string; end; var dw: TData<Tdanwei> := TSerial.unmarshal<TData<Tdanwei>>(TStream(req.Body));
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/p/17641421.html