I would not say that the Liskov replacement principle is a “form” of covariance, since general covariance allows LSP to be expressed in general relations. Starting with C # 4 / .NET 4, you can consider IEnumerable<Banana>how you IEnumerable<Fruit>should be able to do this without any unpleasant surprises - this is exactly what LSP requires.
source
share