[fpc-pascal] Best way to use lists

Michael Fuchs freepascal at ypa-software.de
Mon Jun 16 15:25:49 CEST 2008


Hello,

I try to implement some lists, so I can use them like the "List(of X)"
in VB.NET. What is the best way to do this?

1.) Make some new classes, derived from TFPObjectList and overwrite the
Add/Extract/Remove/... -functions?

2.) Make a new class with a private TFPObjectList and hand over the
Add/Extract/Remove/...-functions with typecasting?

3.) Or make a new generic class, derived from TFPObjectList and uses
this? Generics are stable in 2.2.0?

thx
Michael




More information about the fpc-pascal mailing list