I am trying to do the following in Delphi 2010:
TDataConverter = class abstract
public
function Convert<T>(const AData: T): string; virtual; abstract;
end;
However, I keep getting the following compiler error:
E2533 Virtual, dynamic and message methods cannot have type parameters
I don't quite understand the reason why I can't do this. I can do this in C# e.g.
public abstract class DataConverter
{
public abstract string Convert<T>(T data);
}
Anyone know the reasoning behind this?