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 6009181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:56:02+00:00 2026-05-23T01:56:02+00:00

I have a perhaps silly question… I am trying to determine what is the

  • 0

I have a perhaps silly question… I am trying to determine what is the best approach for typing a property whose value will be either “New” or “Used”. Do I use an enum or should I just go with a boolean (e.g. IsNew)? If I go with enum, what should I call this type and property name? (public NewOrUsed NewOrUsed {get; set;} <– confusing)

Obviously, with enum I can have state that declares neither value (NONE, NEW, USED) and enum is more future-proof (although one can claim there is no chance other values will exist). Again, what is the appropriate name for such a type and property?

With boolean – it’s pretty straight forward (either using IsNew or IsUsed)

I know it’s silly, but I am curious what others think

Regards
Z..

Update

If you prefer enum, please comment on what should be appropriate name for type and property (e.g public NewUsedType NewOrUsed {get; set;})

  • 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-23T01:56:03+00:00Added an answer on May 23, 2026 at 1:56 am

    You mentioned in a comment “I allready [sic] have a Condition – it refers to a condition when something is Y”Used” (e.g. used vehicle/book can be in “fair”, “like new”, “mint” condition) ;)”

    So with that piece of information, I’d definitely go with a bool. You already have an extensible way of establishing the condition so this is more of a categorical thing. You may some time in the future you may want something whether more than one condition counts as “New” say:

    public enum ConditionType {Fair, LikeNew, Mint, New}
    
    public ConditionType Condition { get; set; }
    
    public bool IsNew
    {
        get { return Condition == ConditionType.New || Condition == ConditionType.Mint; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have what may be a simple question (and perhaps silly)... If you release
i have a (perhaps stupid) question: im using 2 threads, one is writing floats
I have an ObjectDataSource (but perhaps this question is the same for all kinds
I have a pretty simple question which perhaps someone familiar with Server/Client design &
Looking for advice (perhaps best practice). We have a MS Word document (Office 2007)
I know the question is a little choppy and perhaps misleading,but I have a
Perhaps it is a silly question but I want to be sure about it.
This is perhaps a rather silly problem. I have a CheckBox on my page
bit of a silly question perhaps. But I want to understand why the syntax
This is perhaps a silly question, but I can't seem to find out how

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.