I\'m using a DateTime in C# to display times. What date portion does everyone use when constructing a time?
E.g. the following is not valid because ther
May I suggest that in some cases a custom struct could do? It could have an Int32 backing value (there are 86 milion milliseconds in a day; this would fit in an Int32).
There could be get-only properties :
Hours Minutes Seconds Milliseconds
You could also overload operators such as +, - and so on. Implement IEquatable, IComparable and whatever may be the case. Overload Equals, == . Overload and override ToString.
You could also provide more methods to construct from a DateTime or append to a datetime and so on.