views:

248

answers:

1

Hello,

By using Google I have found some nice snippets of example code for using TDictionary in Delphi, but have not been able to compile any of them.

I use Delphi 2009 Update 1,2,3,4.

When I write this:

var Dic: TDictionary<Integer,string>;

I get "Unknown idenitifier TDictionary<,>"

How to use them?

+9  A: 

Have you added Generics.Collections to your uses list?

Mason Wheeler
I thought its for NET.Thanks!
John
Yeah. Generics.Collections was designed specifically to be similar interface-wise to the .NET generic collections, but they don't quite work the same way.
Mason Wheeler