Home Cooker Classes Others Rice CookerGX
Classes  >  file  >  LastWriteTime(string)
file class : LastWriteTime(string) setter

Description

Sets the date and time when the file was last written to.

Syntax

fileInstance.LastWriteTime = newLastWriteTime

Arguments

ClassNameDescription
stringnewLastWriteTimeThe new date and time when the file was last written to.

Return value

None

Sample code

//anyFile is a instance of file type.

anyFile.LastWriteTime = "3/04/2016 4:13:00";

Notes

It's a wrapper of the System.IO.FileInfo.LastWriteTime.

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.