Hot answers tagged

6

Yes absolutely it is a good idea because we want the compiler to check as much as possible. If the options were a list of strings any mistypings would not be discovered until runtime. The test you can do to see which fits your solutions is this: If you were to introduce a new option tomorrow is it acceptable to deploy a new version with new code or do you ...


4

To directly answer your question: yes, it is possible to have a class with only booleans. // C# example public class VehicleOptions { public boolean DriversSideAirbags { get; set; } public boolean PassengersSideAirbags { get; set; } public boolean FrontCurtainAirbags { get; set; } public boolean MiddleCurtainAirbags { get; set; } public boolean ...


2

Test as much as possible before deployment Deployment isn't cheap. Even if the deployment is fully automated and pushed automatically from the commit it still takes time to deploy, it prevents any use of the development environment while deploying and if you deploy a broken application the development environment is stuck until things get fixed. This ...


2

Unless an option is only a name, you could also go full OO and create an IOption interface (I don't know C# but this should more or less compile): interface IOption { String optionName(); double optionPrice(); List<IOption> exclusive(); //list of options that can't be selected with with this one //etc } Then each option implements that ...


1

Have a look in HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\NewProjectDialog where the FxVersion key will contain the default framework choice. You could change it to a higher version and find out if it's a mistake or not. Probably not. You'll get a bunch of features & fixes in any case. Here are the Release Notes for .NET Framework 4.6.1, the ...



Only top voted, non community-wiki answers of a minimum length are eligible