How to get a filesize?

  • Thread starter Thread starter Jason Chan
  • Start date Start date
J

Jason Chan

I am playing with file, and i have a basic question.
How can I get the filesize if I provided a full path?
 
Try this

FileInfo fInfo = new FileInfo(@"c:\test.txt");

long size = fInfo.Length;
 
Back
Top