Home  |  Delphi .net Home  |  System.IO.FileInfo  |  ToString Method
  
ToString  
Method  
Returns the current file name
FileInfo Class
System.IO NameSpace
CF1.  Function ToString : String;
CF : Methods with this mark are Compact Framework Compatible
Description
The ToString method is common to many classes - here it returns the file name as the representative string for the class.
Microsoft MSDN Links
System.IO
System.IO.FileInfo
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

uses
  System.IO;

var
  FileInfo : System.IO.FileInfo;

begin
  // Create a FileInfo object for a text file
  FileInfo := System.IO.FileInfo.Create('C:\DelphiBasics.txt');

  // Display the FileInfo as a string
  Console.WriteLine(FileInfo.ToString);

  Console.Readline;
end.
   C:\DelphiBasics.txt
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author