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

  • SEARCH
  • Home
  • 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 7168815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:51:29+00:00 2026-05-28T14:51:29+00:00

This time, I’m gonna create a math problems. I plan to have a dictionary

  • 0

This time, I’m gonna create a math problems. I plan to have a dictionary where the key is Levels enum {Easy, Medium, Hard} and value should contain some configuration about how to create the problems.

For example:

BinaryProblemConfiguration
    + Bound1 : Bound<int>
    + Bound2 : Bound<int>

Bound has two properties: min and max.

Others types of problems don’t need Bounds, but need other data.

So, I was thinking create a interface called IConfiguration.

public interface IConfiguration {}

And concrete Configurations should be:

public class BinaryProblemConfiguration : IConfiguration
{
    public Bound Bound1 {get;set;}
    public Bound Bound2 {get;set;}
}

public class AnotherProblemConfiguration : IConfiguration
{
    // other stuff
}

The idea is to have a dictionary called ConfigurationLevels. Is this a good practice left the interface empty or means is wrong with my design?

  • 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-28T14:51:30+00:00Added an answer on May 28, 2026 at 2:51 pm

    The .NET Framework Design Guidelines calls this a “marker” interface and definitely says that it is a bad idea. They recommned using a custom Attribute instead.

    Avoid using marker interfaces (interfaces with no members).

    Custom attributes provide a way to mark a type. For more information
    about custom attributes, see Writing Custom Attributes. Custom
    attributes are preferred when you can defer checking for the attribute
    until the code is executing. If your scenario requires compile-time
    checking, you cannot comply with this guideline.

    http://msdn.microsoft.com/en-us/library/ms229022.aspx

    public sealed class ConfigurationAttribute : Attribute {
    
    }
    
    
    [ConfigurationAttribute]
    public class AnotherProblemConfiguration : IConfiguration 
    { 
        // other stuff 
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This time I have an error which I have been trying again to figure
this time it's about Ruby On Rails. I have a form in the view
Easy question this time. I'm trying to test whether or not a string does
This time my setup looks like this: one table with galleries names CREATE TABLE
This time I have a more philosopical question. Most MVC tutorials/books seem to suggest
The problem this time is to get the median of three values (easy) I
This time I have a very lame problem, which was working perfectly but now
I have this time: String myTime = "14:10"; Now I want to add 10
This time, I have a cell holding a natural number, let's say 10. Starting
At this time, I have this piece of code for my employee class. But

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.