Is it possible to create constructor for an Abstract class?
29 April 2010
1,979 views
No Comment
Yes, its possible to create constructors for Abstract classes. We can create Private, Public and Protected constructors for Abstract classes
Example:
Abstract class myAbstClass
{
public myAbstClass()
{ }
private myAbstClass(int x)
{ //some implementation }
protected myAbstClass(string strX, string strY, int x)
{ //some implementation }
}
Popularity: 21% [?]
Related interview questions
- How can I create a Singleton class by using public constructor?
- What is differance between Abstract and Interface
- What are Classes and structures
- How do you inherit from a class in c#?
- What are the good practices to use while designing for reuse











Leave your response!
You must be logged in to post a comment.