.Net File.GetLastAccessTime updates the last access time of a file

We use the bottom line to get the date and time of the last access to the file.

DateTime dtLastAccesstime = File.GetLastAccessTime(sFilePath);

But we face a strange problem, this call itself changes the last access time. Thus, we get the current time as the last access time.

+5
source share
1 answer

You can find this post , in particular:

Starting with Windows Vista, saving last access time is disabled by default .

, (, , , ).

, , , - , -

+7

All Articles