8protons
8protons

Reputation: 3959

Is there an enum for day, week, month, and year?

Im looking to store time frequency represented as daily, weekly, monthly, and yearly as an enum and was wondering if one already existed within the C# library?

An example would be wanting to keep track of whether the interest on a loan is charged every day, each week, each month, etc.

Upvotes: 0

Views: 4220

Answers (2)

Srinivasan Jayakumar
Srinivasan Jayakumar

Reputation: 50

I have seen such enum in TaskScheduler class but it too lacks Yearly. I hope creating a new enum would be a right option.

Upvotes: 0

silkfire
silkfire

Reputation: 25945

As far as I know, such an enum doesn't exist by default in the framework, but you can easily create one yourself:

enum Periodicity {
   Daily,
   Weekly,
   Monthly,
   Annually
}

Upvotes: 3

Related Questions