Why the following happens: "Invalid rollback from" Int64 "to" DateTime "". an exception?
long oldDate=new DateTime(2015, 1, 1).Ticks; DateTime newDate=Convert.ToDateTime(oldDate);
.Ticks is long / Int64, and MSDN documents Convert.ToDateTime (Int64) show a method that accepts long / Int64.
public static DateTime ToDateTime( long value )
EDIT: As stated in ebyrob below, this should be:
long oldDate=new DateTime(2015, 1, 1).Ticks; DateTime newDate=new DateTime(oldDate);
source share