Should I use String instead of TFilename?

When passing filename parameters to procedures/functions, should I use TFilename or String.

If there is a difference, what is it, and what are then potential ramifications if using a String?


procedure TForm1.OpenFile(const AFilename : String);
    //Open the file if it exists


I think TFilename should be used when developing components because that way IDE can show it's property editor (TOpenDialog will be shown when clicked on ellipsis in the property inspector).

Other than this there is basically no difference which one to use. Remember that if you use TFilename you must add SysUtils to your uses clause.

Need Your Help

How do i use TLBIMP.EXE?

c# .net import components tlbimp

I've found it in my visual studio folder, but when i open it it simply loads and closes instantly. is that the right way to reach to it's functionalities ?

Using Sizzle to parse XML files?

jquery xml sizzle

I created a library for parsing and extracting information from a set of XML files that uses jQuery. So it's pretty simple to do things like this: