确定文件大小在VB.NET [英] Determining file size in VB.NET
本文介绍了确定文件大小在VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何确定一个文本文件的大小?
我知道我可以只算字符,但该文件将几MB的大。
解决方案
昏暗MYFILE作为新的FileInfo(file.txt的)
昏暗sizeInBytes只要= myFile.Length
How do I determine the size of a text file?
I know that I could just count characters, but the file will be several MB's large.
解决方案
Dim myFile As New FileInfo("file.txt")
Dim sizeInBytes As Long = myFile.Length
这篇关于确定文件大小在VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文