Do you know the year 1601??
Today I tried to get the CreationTime of the bin/webapplication1.dll. I was in the wrong directory, so there was no webapplication1.dll. The nice think was, that I did not get any exception and a nice date: 1.1.1601 (minvalue of file dates).
System.IO.FileInfo info = new System.IO.FileInfo(Server.MapPath("/bin/mydll.dll"));
Main.Controls.Add(new LiteralControl("mydll.dll = " + info.CreationTime));
Do you have any reason why I get no exceptions? And my second question, why is there a different minvalue for file dates. The DateTime object allows you to use dates between 1.1.0000 and 31.12.9999.
2 Comments
Comments have been disabled for this content.
Raymond Chen said
1.1.1601 is the zero date for FILETIME.
Michael Schwarz said
Yes, I see this in the MSDN (and as I have written in my text). But why do I have there a differen range to DateTime?