hello can i just ask what is wrong with my code:
private void listViewApp_SelectedIndexChanged(object sender,
System.EventArgs e)
{
labelAppName.Text = labelAppCreated.Text = labelAppModified.Text =
labelAppAccessed.Text = "";
if (listViewApp.SelectedItems.Count > 0)
{
string fullname = (string)listViewApp.SelectedItems[0].Tag;
FileInfo fi = new FileInfo (fullname);
label1.Text = fi.Name;
label2.Text = fi.CreationTime.ToLongDateString ();
label3.Text = fi.LastWriteTime.ToLongDateString ()
label4.Text = fi.LastAccessTime.ToLongDateString ();
}
the label2.Text dosent shows the date the file was build. For example, I build my .exe on my local folder and when i update my .exe to ther server (by copy-paste) it always shows the date when the file was (the first time)copied to that folder and not the date the file was build.
Any help pls.
Thanks.
GregPosted Feb 16, 2007, 5:39 AM
The Creation Time is giving the time the file was created, i.e. when you first copied it to its present location. If you renamed your build exe, and then copied it, you'd get the time it was copied there.
Does the Last Write Time not give you the time it was last updated?