Search
Learn
Share

Get creation and modified date of file in C#

Published by Profile Image DevDashboard on 11 January, 2017
40 views
Use the following code snippets to get the creation or modified date from a file path.

var createdAt = File.GetCreationTime(filePath);

var lastModifiedAt = File.GetLastWriteTime(filePath);