How do you convert Variant Records to a safe type in Delphi.Net? For example, I want to use the following type in a .Net program
type
TMyDate = packed record
case boolean of
true : (date : integer);
false : (day : byte;
month : byte;
year : smallint);
end;
I've seen references to using a StructLayout and FieldOffset attribute but I can't find any examples.
Start Free Trial