KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
A few times, when refactoring code, I have forgotten to add the explicit keyword when adding a parameter to a previously-parameterless constructor, or removing parameters from a previously multi-parameter constructor. To prevent this, I have gotten in the habit of marking every constructor explicit , no matter no many arguments it has. (Except, of course, those constructors for which I actually want implicit conversion.) Is there any downside to this? Performance? Compile time?
Tags (comma-separated)
Save Edits
Cancel