Størrelse på fil i VB.net
Jeg har brug for at finde størrelsen på en fil valgt i en OpenFileDialog. Koden er lidt forenklet:If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim actualsize, maxsize As Integer
maxsize = 50000 ' max bytes of file
actualsize = 10 ' actual size <-- I NEED HELP HERE!
If maxsize <= actualsize Then
MsgBox("The file you have chosen is too big.")
Else
'Size is okay
End If
End If
