23-07-20, 07:00 AM
تفضل أخى العزيز
كود :
Imports System.IO
Module Module1
Sub Main()
' Get file info for test.txt.
' ... Create this file in Visual Studio and select Copy If Newer on its properties.
Dim info As New FileInfo("test.txt")
' Get length of the file.
Dim length As Long = info.Length
' Add more characters to the file.
File.AppendAllText("test.txt", " More characters.")
' Get another file info.
' ... Then get the length.
Dim info2 As New FileInfo("test.txt")
Dim length2 As Long = info2.Length
' Show how the size changed.
Console.WriteLine("Before and after: {0}, {1}", length, length2)
Console.WriteLine("Size increase: {0}", length2 - length)
End Sub
End Module