![]() |
|||
|
About Article
Alternative to Partial DateTime Object Equality
If you use the logic from your FlagIsSet function, you can remove half of your tests: DatePartFlags equalFlags = DatePartFlags.Ticks; equalFlags |= (now.Year == then.Year) ? DatePartFlags.Year : 0; equalFlags |= (now.Month == then.Month) ? DatePartFlags.Month : 0; ...
Top News
Old Japanese Man Creates Amazing Art Using Excel (Wait, Excel?) Get the Insider News free each morning.Related Videos
Related Articles
|
||||||||||||||