2009-11-06 53 views

回答

3

使用FileInfo类的length属性:

FileInfo fi = new FileInfo(pathToMyFile); 
if(fi.Exists) 
    long sizeOfMyFile = fi.Length;