property access error in abstract class

How can you immplement constructor in abstract class ?

abstract public myClass(string myParm);

gives me an error.

psokoloAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
NightmanConnect With a Mentor CTOCommented:
You could overload it:

abstract class myClass
{
  public myClass(string myParam)
  {
  }
}

class myDerivedClass: myClass
{
  public myDerivedClass (string myParam,int myInt):base(myParam)
  {
  }
}
0
 
NightmanCTOCommented:
public myClass (string myParam)
0
 
psokoloAuthor Commented:
but I would like each class to implement a different constructor.
0
 
NightmanCTOCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.