views:

636

answers:

3

Hello, I am migrating an application written in Delphi 2007 .Net to Delphi Prism, which is the best option to replace the TStringList and TStrings class?

Thanks in advance.

Bye.

+6  A: 

Have you looked at ShineOn? It has a Classes.pas with TStringList in it.

Jim McKeeth
A: 

I have used Collections.Specialized.HybridDictionary (and similar) classes in the little bit of C# I have done. As it is a standard .net object it should be available in Prism.

I don't know if it has a LoadFrom/Save to file though

Gerry
+8  A: 

Just use the built in List types in the .NET framework, or the StringCollection.

The easiest are the generic lists:

List<String>

But StringCollection has a few bits that the List does not have; you can read a bit about that in this thread.

The advantage of using built-in .NET Framework classes, is that there is plenty documentation at MSDN, have loads of examples (for instance atCodeProject), and usually support more features (like implementing required interfaces to do data binding and such: the TStringList in ShineOn does not do that).

The advantage of using VCL like things is that you are more familiar with the VCL so it gets you started quicker. But there is a reason why VCL.NET has not been developed further...

Janka Janos has a great comparison chart of features in C# and Delphi Prism. That will help you translate C# examples into Delphi Prism code.

--jeroen

Jeroen Pluimers