G Guest Feb 20, 2005 #2 Hello Sara, You can use the FileInfo class. The Length property returns the length in bytes. public static long GetFileSizeInBytes(string strFullFilePath) { System.IO.FileInfo fi = new System.IO.FileInfo(strFullFilePath); return fi.Length; } Tim Stall http://timstall.dotnetdevelopersjournal.com/
Hello Sara, You can use the FileInfo class. The Length property returns the length in bytes. public static long GetFileSizeInBytes(string strFullFilePath) { System.IO.FileInfo fi = new System.IO.FileInfo(strFullFilePath); return fi.Length; } Tim Stall http://timstall.dotnetdevelopersjournal.com/
G Guest Feb 21, 2005 #3 Thanks Tim Tim said: Hello Sara, You can use the FileInfo class. The Length property returns the length in bytes. public static long GetFileSizeInBytes(string strFullFilePath) { System.IO.FileInfo fi = new System.IO.FileInfo(strFullFilePath); return fi.Length; } Tim Stall http://timstall.dotnetdevelopersjournal.com/ Click to expand...
Thanks Tim Tim said: Hello Sara, You can use the FileInfo class. The Length property returns the length in bytes. public static long GetFileSizeInBytes(string strFullFilePath) { System.IO.FileInfo fi = new System.IO.FileInfo(strFullFilePath); return fi.Length; } Tim Stall http://timstall.dotnetdevelopersjournal.com/ Click to expand...