Those constructors usually are protected and never public. Actually, that's something that the FxCop tool (www.gotdotnet.com/team/fxcop/) will enforce in your assemblies - if you are not using that tool, you should consider it right away. It enforces best practices across your code.
So, the constructor serves the purpose of initializing whatever is needed on the base abstract class, whenever a descendant class is created. Note that if the abstract class offers only a single version of the constructor – say, receiving a parameter, or not receiving a parameter – it HAS to be called by the descendant class. In the case of a 'parameterless' constructor, this happens automatically whenever the derived class is constructed.
Related Q&A from Daniel Cazzulino
Here Daniel Cazzulino explains how to load a DSL (domain specific language) domain model instance file programmatically. This requires the .NET type ...continue reading
Here we offer a glimpse at 12 of .NET development expert Danny Cazzulino's top ASP.NET questions and answers.continue reading
C# developers should NOT be modifying InitializeComponent method in the code-behind (or any of the variable definitions) by hand.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.