Watch, Follow, &
Connect with Us

ID: 25670, StringList value class

by Janez Atmapuri Makovsek Email: Anonymous


StringList value class is the value type version of the TStringList. You can use the StringList variable without calling the constructor or worrying about freeing the object.
Download Details
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 10.0  to 11.0 391 downloads
Copyright: No significant restrictions


Size: 3,057 bytes
Updated on Thu, 05 Jun 2008 01:22:10 GMT
Originally uploaded on Wed, 04 Jun 2008 01:35:03 GMT
SHA1 Hash: EE88BEF157FA54E852DEB89F8BF672D1F9C9FDCE
MD5 Hash: 2E1D0D58FE4540CF6CB06AFD3CB028C5

    Explore the files in this upload

Description
StringList is the same as TStringList except that it is a value
type. It does not have to be created, destroyed or put within
try/finally. This is done by the compiler for you. There are
virtually no special performance penalties for these to work:

var strings: StringList;
astr: string;
begin
strings.Add('test1');
strings.Add('test2');
aStr := string(strings);
RichEdit.Lines.AddStrings(strings);
end;

The code can be used as a template to wrap any TObject as a value class type.

Server Response from: ETNACDC01