Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-06

Best way to use lists

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Fuchs

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

Reply by email

Michael Fuchs

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

Reply by email