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.
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.
BindingFlags flags = BindingFlags.Public | BindingFlags.Instance;
var constructor = typeof(MyClass).GetConstructor(flags, null, new Type[0], null);
This will find the constructor in one case, but not the other.