public static void Run()
{
// ExStart:GetLastModifiedDate
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_ModifyingAndConvertingImages();
using (RasterImage image = (RasterImage)Image.Load(dataDir + "aspose-logo.jpg"))
{
// Gets the date from [FileInfo]
string modifyDate = image.GetModifyDate(true).ToString();
Console.WriteLine("Last modify date using [FileInfo]: {0}", modifyDate);
// Gets the date from XMP metadata of [FileInfo] as long as it's not default case
modifyDate = image.GetModifyDate(false).ToString();
Console.WriteLine("Last modify date using info from [FileInfo] and XMP metadata: {0}", modifyDate);
}
// ExEnd:GetLastModifiedDate
}
}