Hello,
my skill is still stuck in delphi 7 days so...
I just found that primitive types now have member functions built in but I wonder why .ToString() of a boolean variable behave this way.
in the code below,
#1, TUseBoolStrs.True is quite long to type, I expected a simple TRUE here,
#2, I can't think of a use of it. how come a boolean-object member function is returning string based on a boolean input parameter instead of the boolean-object's own value?
var
mybool:boolean;
begin
mybool:=False;
//#1
listbox1.items.add(mybool.ToString(TUseBoolStrs.True); //return 'False'
//#2
listbox1.items.add(mybool.ToString(True); //return '-1' which is comming from the value parameter instead of mybool
listbox1.items.add(mybool.ToString(False); //return '0' which is comming from the value parameter instead of mybool
end;