Home Notices Documents Classes Download Others Rice
Classes  >  file  >  LastAccessTime(string)
file class : LastAccessTime(string) setter

Description

Sets a string that indicates the date and time when the file was last accessed.

Syntax

fileInstance.LastAccessTime = newLastAccessTime

Arguments

ClassNameDescription
stringnewLastAccessTimeThe date and time when the file was last accessed.

Return value

None

Sample code

1:

file f = new file("c:\somewhere...");

2:

f.LastAccessTime = "3/04/2016 4:13:00";

Notes

It's a wrapper of the System.IO.FileInfo.LastAccessTime property.

The date and time string is converted to the C#'s DateTime type by the System.DateTime.Parse(String) method.

Links for reference

Copyright © Rice All rights reserved.