Quantcast
Channel: Planet Object Pascal
Viewing all articles
Browse latest Browse all 1725

Behind the connection: Using RTTI to convert record to/from string

$
0
0
Delphi RTTI can be easily used to convert a record (Or a class by the way) to a string representation without taking care of how the record is changed during software maintenance. RTTI has a set of methods to handle metadata collected by the compiler at compile time. For example, you can iterate thru all fields of a record to find out his name, data type and get or set his value. I used those

Viewing all articles
Browse latest Browse all 1725

Trending Articles