Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replacement for TStringList in Delphi Prism.

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.

like image 207
Salvador Avatar asked Dec 07 '22 06:12

Salvador


1 Answers

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

like image 66
Jeroen Wiert Pluimers Avatar answered Dec 24 '22 19:12

Jeroen Wiert Pluimers