Udostępnij za pośrednictwem


IsolatedStorageFile.GetLastAccessTime Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns the date and time a specified file or directory was last accessed.

Namespace:  System.IO.IsolatedStorage
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Public Function GetLastAccessTime ( _
    path As String _
) As DateTimeOffset
[SecuritySafeCriticalAttribute]
public DateTimeOffset GetLastAccessTime(
    string path
)

Parameters

  • path
    Type: System.String
    The path to the file or directory for which to obtain last access date and time information.

Return Value

Type: System.DateTimeOffset
The date and time that the specified file or directory was last accessed. This value is expressed in local time.

Exceptions

Exception Condition
ArgumentException

path is a zero-length string, contains only white space, or contains one or more invalid characters defined by the Path.GetInvalidPathChars method.

ArgumentNullException

path is nulla null reference (Nothing in Visual Basic).

InvalidOperationException

The isolated store has been closed.

ObjectDisposedException

The isolated store has been disposed.

IsolatedStorageException

The isolated store has been removed.

-or-

Isolated storage is disabled.

Remarks

If the file described by path does not exist, this method returns 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC), adjusted to local time.

Version Information

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.