.net - Is there a builtin c# class to define time-window that has start date and end date? -


is there suitable c# class in regards define time-window can use set start date , end date?

there's nothing in framework, alternatives be:

  • tuple<datetime, datetime> - not have built-in date functionality store data
  • tuple<datetime, timespan> - if start date , duration better meets needs
  • custom class - simple class 2 properties - build date functions within meet needs
  • third-party libraries - search ".net date library" - i'm sure you'll find has sort of interval class may help.

Comments