Udostępnij za pośrednictwem


IsolatedStorageFile.GetCreationTime Method

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

Returns the creation date and time of a specified file or directory.

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

Syntax

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

Parameters

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

Return Value

Type: System.DateTimeOffset
The creation date and time for the specified file or directory. 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.