[NOTE: Run full screen, HD with Scaling off. It should display at 1280x720.]

A very short introduction to Generic Collections in Delphi 2009. Create a TList of Integers and show adding and removing items from it. Showing some of the differences in types, gotchas and errors you might get.

Generics, or parametrized types, are a type that works with another type that is defined later. Collections are a great example of using them. You create a generic TList, and then when you use it you declare what type it will contain. Then it will be strongly typed to that specific type, both in adding items and removing them.

Delphi Generics work with all types in Delphi: native types (Integer, string, etc.), Records, Objects and Interfaces.
This conversation is missing your voice. Take five seconds to join Vimeo or log in.

Advertisement

1 Related collections

Statistics

  •  
    plays
    likes
    comments
  • Total
    plays 1,165
    likes 0
    comments 1
  • Dec 23rd
    plays 0
    likes 0
    comments 0
  • Dec 22nd
    plays 1
    likes 0
    comments 0
  • Dec 21st
    plays 2
    likes 0
    comments 0
  • Dec 20th
    plays 0
    likes 0
    comments 0
  • Dec 19th
    plays 2
    likes 0
    comments 0
  • Dec 18th
    plays 0
    likes 0
    comments 0
  • Dec 17th
    plays 0
    likes 0
    comments 0
  • Dec 16th
    plays 2
    likes 0
    comments 0
Previous Week

Downloads

Please join Vimeo or log in to download the original file. It only takes a few seconds.