rspec/rules/S6562/why-dotnet.adoc

4 lines
467 B
Plaintext
Raw Permalink Normal View History

== Why is this an issue?
Not knowing the `Kind` of the `DateTime` object that an application is using can lead to misunderstandings when displaying or comparing them. Explicitly setting the `Kind` property helps the application to stay consistent, and its maintainers understand what kind of date is being managed.
To achieve this, when instantiating a new `DateTime` object you should always use a constructor overload that allows you to define the `Kind` property.