下面代码中prop.GetAttributes是获得什么属性?他和tp.GetProperties 有什么区别吗?class function TmyXmlFieldAttribute.GetValueByName(AObject: TObject;
  APropName: string): TValue;
var
  ctx: TRttiContext;
  tp: TRttiType;
  prop: TRttiProperty;
  att: TCustomAttribute;
begin
  tp := ctx.GetType(AObject.ClassType);
  // 查找所有属性
  for prop in tp.GetProperties do
  begin
    // 查找属性特性
    for att in prop.GetAttributes do
    begin
      if att.InheritsFrom(TmyXmlFieldAttribute) then
      begin
        if CompareText(TmyXmlFieldAttribute(att).fName,APropName)=0 then
        begin
          Exit(prop.GetValue(AObject));
        end;
      end;
    end;
  end;
  Result := nil;
end;DelphiRtti函数