Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services.
Privacy policy. Thank you. Microsoft makes no warranties, express or implied, with respect to the information provided here. A DateTime containing the value to set for the last write date and time of path. This value is expressed in local time. NET Framework and.
ArgumentOutOfRangeException: The creationTime specifies a value outside the range of dates, times, or both permitted for this operation. UnauthorizedAccessException: The caller does not have the required permission.
NotSupportedException: The path is in an invalid format. Below are the programs to illustrate the File. Program 1: Before running the below code, a file file. IO namespaces using System; using System. SetCreationTime "file. GetCreationTime "file. Skip to content. Change Language. Related Articles. Table of Contents.
You can also get this times in UTC, e. Use instance of FileInfo class when you want to get more than one file time or any other informations about the file like file attributes.
Advantage is that you will get all needed informations just in one disk access. See following example.
0コメント