Is there any performance difference in using DateTime.Add(TimeSpan) vs. DateTime.AddDays(double), DateTime.AddHours(double), etc.?
Is there any performance difference in using DateTime.Add(TimeSpan) vs. DateTime.AddDays(double) , DateTime.AddHours(double) , etc.?
Share
Add(TimeSpan) calls AddTicks directly with the ._ticks member of the TimeSpan. AddDays, etc., do a multiplication and range check, then call AddTicks. So Add(TimeSpan) is probably fractionally faster, but almost certainly insignificantly so: all will be blindingly fast.