TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
boris_callens
NA
6
0
Get File Size
Nov 5 2007 5:37 AM
Hi, In short: I have a local file and I need to get the filesize. I thought this would have been an easy job, but a search ends up with zero results and a quick google doesn't give me any satisfying results eather. Logically speaking I would have thought the File class would have been the way to go, but there's no GetSize() or Size exposed. I guess I can get the length by doing this: int localSize = File.ReadAllBytes(@".\Temp\DSAnalyserReport.tmp").Length; But reading the whole file just to get the size looks like an expensive way to get there. Any suggestions?
Reply
Answers (
2
)
help me plzz... Problem in desiging MDI application using C#.Net
Need help with xpath and C#