FileInfo.LastAccessTime : FileInfo « System.IO « VB.Net by API






FileInfo.LastAccessTime

  

Imports System.IO

Module Module1

    Sub Main()
        Dim Root As New DirectoryInfo("C:\")

        Dim Files As FileInfo() = Root.GetFiles("*.*")
        Dim Dirs As DirectoryInfo() = Root.GetDirectories("*.*")

        Console.WriteLine("Root Files")
        Dim Filename As FileInfo

        For Each Filename In Files
            Try
                Console.Write(Filename.FullName)
                Console.Write(" Size: {0} bytes", Filename.Length)
                Console.WriteLine(" Last use: {0}", Filename.LastAccessTime)
            Catch E As Exception
                Console.WriteLine("Error accessing File")
            End Try
        Next
    End Sub

End Module

   
    
  








Related examples in the same category

1.FileInfo.CreationTime
2.FileInfo.Extension
3.FileInfo.FullName
4.FileInfo.IsReadOnly
5.FileInfo.LastWriteTime
6.FileInfo.Length