How to

get file size

Published: 8. January 2009 | Updated: 8. January 2009
License: Microsoft Public License (MS-PL)
Categories: File system » Files
Tags: C# File System Windows
Was this snippet helpful for you? YESYES / NONO

Import namespace

using System.IO;

Code

FileInfo info = new FileInfo(@"C:\test.txt");
long size = info.Length;
Send us feedback about this snippet »



Related Snippets: