Not sure if my problem can be considered as a bug. But when I try to compare a DateTime with MaxValue, it already returns false.
Code:
DateTime aDate = DateTime.MaxValue;
Console.WriteLine(DateTime.Compare(DateTime.MaxValue, aDate));
Very simply code, can you guess what you will get “0″, which means they are not equal!!
Some people says it caused by “DateTime.MaxValue is not serializable” (http://blogs.ugidotnet.org/teo/archive/2005/11/21/30271.aspx)
Tags: asp .net, Computing, datetime, maxvalue, Programming, serializable
Categories: Computing, Programming
No Comments »