Hi,
I've got program which is checking OS' backups (if backup was created, what 'size' is backup file have, etc) and I've got Function which imports file's size:
In file
I get 632 not 631,68 at Console Window. Why is it rounded? I want get number from file which isn't rounded. What do I have to change in that function?
I've got program which is checking OS' backups (if backup was created, what 'size' is backup file have, etc) and I've got Function which imports file's size:
VB.NET:
Function wielkoscNiedzielnyOdczytaj() As Long
Dim wielkoscNiedzielny As Long = 0
Try
Using sr As New StreamReader("C:\TAI\ServerCheckBackup\fWielkoscNiedzielny.txt")
wielkoscNiedzielny = sr.ReadLine()
Return wielkoscNiedzielny
End Using
Catch e As Exception
Return wielkoscNiedzielny = 0
End Try
End Function
I've got sth like: 231,86. It's in MB. So when I give:C:\TAI\ServerCheckBackup\fWielkoscNiedzielny.txt
VB.NET:
Console.WriteLine( wielkoscNiedzielnyOdczytaj())