Getting type of record field with RTTI fails for static arrays

前端 未结 1 1795
一个人的身影
一个人的身影 2020-12-19 08:34

I am trying to get types for record fields in order to create correct comparer (as general solution for any/almost any record type). I can\'t find type information for stati

相关标签:
1条回答
  • 2020-12-19 08:46

    You need to declare a type in order to have RTTI available. For example:

    type
      TMyStaticArrayOfByte = array[0..3] of byte;
    
      TArrFieldTest = record
        a: string;
        b: TMyStaticArrayOfByte;
      end;
    
    0 讨论(0)
提交回复
热议问题