Checking the size of a file

  • Thread starter Thread starter Dakkar
  • Start date Start date
D

Dakkar

Is it possible to check the size of a file that i wanted?
If it is how?
 
Hi,

Use the FileInfo.Length property.

Eg:
FileInfo info = new FileInfo("C:\\asd.txt");
Console.WriteLine(info.Length);

HTH,
Rakesh Rajan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top