出于兼容性原因(对象被序列化和导出并且必须匹配外部名称)我希望字段名称为“类型”,即
TTBaseWebResponse = class
private
type: String;
success: Integer;
end;
or
TTBaseWebResponse = class
private
ftype: String;
fsuccess: Integer;
public
type: string read fstring write fstring;
success: integer read fsuccess write fsuccess;
end;
Delphi (XE2) 甚至不会编译它。这是可能吗?如何?