I'm not sure if I am getting this right. In order to observe proper SOLID principles, am I forbidden to inherit from concrete classes? Does that mean that every concrete class that I have more or less be sealed (or at least considered to be sealed)?
This is confusing for me because I encountered this code from our repository:
class FontList : ObservableCollection<string>
{
public FontList()
{
foreach (FontFamily f in Fonts.SystemFontFamilies)
{
this.Add(f.ToString());
}
}
}
Which is inheriting from ObservableCollection<string>, a concrete class (correct?). However looking at ObservableCollection:
[Serializable]
public class ObservableCollection<T> : Collection<T>, INotifyCollectionChanged, INotifyPropertyChanged
It is inheriting from Collection<T>, which is also a concrete class. Can anyone explain the correct interpretation of DIP, especially with regard to concrete class inheritance?