在VB.NET中确定文件大小

Joh*_*eal 11 .net vb.net text file

如何确定文本文件的大小?

我知道我可以计算字符,但文件将是几MB的大.

Den*_*aub 35

Dim myFile As New FileInfo("file.txt")
Dim sizeInBytes As Long = myFile.Length
Run Code Online (Sandbox Code Playgroud)