Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3499840
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:39:38+00:00 2026-05-18T12:39:38+00:00

In app.config, I supply a cycle string value: Monday, Tuesday, …, Daily. From that

  • 0

In app.config, I supply a cycle string value: “Monday”, “Tuesday”, …, “Daily”. From that value I wanted to assign a <Flags()> enum. Simply using DayOfWeek does not give me the ability to flag a process as a daily routine. Is there an available .Net class that does provide the day of week as a flag?

In the meantime, I devised the following:

<Flags()> _
Public Enum enumExportCycle As Integer
    Monday = DayOfWeek.Monday
    Tuesday = DayOfWeek.Tuesday
    Wednesday = DayOfWeek.Wednesday + 1
    Thursday = DayOfWeek.Thursday + 4
    Friday = DayOfWeek.Friday + 11
    Saturday = DayOfWeek.Saturday + 26
    Sunday = DayOfWeek.Sunday + 64
    Daily = Monday Or Tuesday Or Wednesday Or Thursday Or Friday Or Saturday Or Sunday
End Enum

It feels somewhat hackish and I am looking for a better way.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T12:39:39+00:00Added an answer on May 18, 2026 at 12:39 pm

    this will work, right?

    <Flags()> _
    Public Enum enumExportCycle As Integer
        Monday = 1
        Tuesday = 2
        Wednesday = 4
        Thursday = 8
        Friday = 16
        Saturday = 32
        Sunday = 64
        Daily = Monday Or Tuesday Or Wednesday Or Thursday Or Friday Or Saturday Or Sunday
    End Enum
    

    or this

    <Flags()> _
    Public Enum enumExportCycle As Integer
        Monday = 2 ^ DayOfWeek.Monday
        Tuesday = 2 ^ DayOfWeek.Tuesday
        Wednesday = 2 ^ DayOfWeek.Wednesday
        Thursday = 2 ^ DayOfWeek.Thursday
        Friday = 2 ^ DayOfWeek.Friday
        Saturday = 2 ^ DayOfWeek.Saturday
        Sunday = 2 ^ DayOfWeek.Sunday
        Daily = Monday Or Tuesday Or Wednesday Or Thursday Or Friday Or Saturday Or Sunday
    End Enum
    

    since DayOfWeek start from 0 (Sunday) to 6 (Saturday)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

App.config: <?xml version=1.0 encoding=utf-8 ?> <configuration> <appSettings> <add key=1 value=An error occured.\r\nPlease try again
This is my app.config: <appSettings> <add key=PreRootFolder value=D:\ /> <add key=RootFolder value=webSite /> <add
How much of the app.config from the WCF Service Library has to be duplicated
Possible Duplicate: app.config file in C# for MS SQL Server 2005 in VS 2008
For example in a .NET app.config you might get <configuration> <configSections> <section name=MyConfig type=MyAssembly.MyType,
I am working on making a custom section of my app.config and web.config to
Is there a way to have the main .net configuration file app.config/web.config include another
I've got an asp.net application which seems to forget that a user is logged
I need to set up multiple Sessionfactories in my app, now I'm facing a
I am using C#, Visual Studio 2010 and Entity Framework 4. I have an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.