This question is out of curiosity. Is there a difference between:
public abstract class MyClass
{
public MyClass()
{
}
}
and
public abstract class MyClass
{
protected MyClass()
{
}
}
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They are the same for all practical purposes.
But since you asked for differences, one difference I can think of is if you are searching for the class’s constructor using reflection, then the BindingFlags that match will be different.
This will find the constructor in one case, but not the other.