Hi....
supposing that i have a Type like this:
Type
TMyType = (mtFirstType, mtSecondType);
I wanna write a 'ToString' function to it, like:
function ToString();
begin
case TMyType of
mtFirstType : result := 'My First Type';
mtSecondType : result := 'My Second Type';
end;
To use like on this example:
myClass = class(TObject)
_MyType: TMyType;
end;
implementation
begin
myObject._MyType := mtFirstType;
writeln(myClass._MyType.ToString();
How can I write a procedure for a type? I don't wanna write to the class, i wanna create a ToString for a Type....