Reflecting Types

This section shows you how to drill down further into the types defined in an assembly and how to reflect those types.

Listing 15.3 illustrates the processes of reflecting member information for types.

Listing 15.3. Reflecting a Type’s Member Information
1: function GetDeclareString(st: System.Type): String; 2: begin 3: Result := ''; 4: if st.IsAbstract then Result := Result + 'abstract '; 5: if st.IsArray then Result := Result + 'array '; 6: if st.IsClass then Result := Result + 'class '; 7: if st.IsContextful then Result := Result + 'context '; 8: if st.IsInterface then Result := Result + 'interface '; 9: if st.IsPointer then Result := Result + 'pointer '; 10: if st.IsPrimitive then Result := Result + 'primitive '; 11: if st.IsPublic ...

Get Delphi for .NET Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.