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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:04:06+00:00 2026-05-15T08:04:06+00:00

I have got class Car, and each class has list of extras (leather, abs,

  • 0

I have got class Car, and each class has list of extras (leather, abs, Folding mirrors etc…)

public Extra
{
public bool Paid {get;set;}
public string Name {get;set;}
public string Code {get;set;}
}

And now, better is:

class Car
{
public Extra Leather {get;set;}
public Extra FoldingMirrors {get;set;}
public Extra Abs {get;set;}
}

or better:

class Car
{
private List<Extra> _listOfExtras=new List<Extra>

public List<Extra> ListOfExtras
{
...
}
}

And the worst part:

My winforms application works offline and one per month is sending datas for me.

I must hold list Of available (foreach car user choose extras) extras in this application so better way I think is option one.

how hold this list of extras in my applications ? It connect with webservice only one time per month.

  • 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-15T08:04:06+00:00Added an answer on May 15, 2026 at 8:04 am

    A list or dictionary (for easier access) of extras would be more flexible.

    It would mean that as extras were added and/or removed from a car you wouldn’t have to modify the Car class which you would have to do if each were added explicitly.

    There are various ways to store the list locally. You could serialise to a file – either plain text or XML which would be better as you’ve got classes that do the serialisation for you, or you could hold it in a local database.

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

Sidebar

Related Questions

I have got a class which has many virtual properties lazy loaded public class
i have got this code: class father{ public: virtual void f() { cout<<1;} };
I have a Car class. It's got a property called enginePower. On the other
I have got some class public static class SessionManager { public static UserSession UserSession
Using the Newtonsoft.Json library, imagine I have got public class Test { public Object
I have got a StartCommand Class: public class StartCommand : ICommand { public void
I have got the following class structure, and have plenty of classes like C
I am using a readprocessmemory class and have got it to work for reading
I have got a designing dilema. I have a class named UserAccount that represent
I've got the class object for an enum (I have a Class<? extends Enum>

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.