i want to do a program download.
but i don't know a manner file size.
may you help me?
Help me
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Mahesh ChandRank #1 · 393.4K pointsPosted Jan 31, 2009, 7:43 AM EST
First of all, you need to have the title of your post that makes some sense. Just "help me" is not good enough. It should be something like - "How to get a file size". Read forum posting guidelines here before post your questions:
http://www.c-sharpcorner.com/Forums/MustRead.aspx
================
You can use the Length property of the FileInfo object something like this.
System.IO.FileInfo fi = new System.IO.FileInfo(filepath);
fi.Length();