There is a pretty basic reason why this error happens. However, until you find the solution, it is a big deal. I was creating a simple base class like the below which I planned on extending in another class.
public class TreeViewModel : INotifyPropertyChanged
{
TreeViewSelector() { }
}
However, when I tried to inherit from my base class, like the below I received the error.
public class TreeViewModelExtended : TreeViewModel
{
public TreeViewModelExtended() : base() { }
}
“Namespace.TreeViewModel.TreeViewModel()”is inaccessible due to its protection level.
“Der Zugriff auf ” Namespace.TreeViewModel.TreeViewModel()” ist aufgrund der Sicherheitsebene nicht möglich.”
It took me some time to finally realize that constructors have a private access descriptor by default. Because I left the access identifier off, it was private and I could therefore not access it. By adding the public access modifier to the base constructor, the error went away.
public class TreeViewModel : INotifyPropertyChanged
{
public TreeViewSelector() { }
}
These are the kind of problems you have once. I thought it was worth mentioning.