File.SetLastWriteTime Method (String, DateTime)
Sets the date and time that the specified file was last written to.
Assembly: mscorlib (in mscorlib.dll)
path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.
path is null.
The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.
The specified path was not found.
The caller does not have the required permission.
path is in an invalid format.
lastWriteTime specifies a value outside the range of dates or times permitted for this operation.
Available since 10
Available since 1.1