Liskov substitution principle and Streams
问题 Does the fact that there are Stream derived classes that cannot be written or sought break the Liskov substitution principle? For example, the NetworkStream cannot be sought, it will throw a NotSupportedException if the method Seek is called. Or because the existence of CanSeek flag it is ok? Considering the well known example of Square inheriting from Rectangle ... would the addition of the flags DoesHeightAffectsWidth and DoesWidthAffectsHeight to Rectangle fix the issue? Doesn't this open