Amit Kumar
What is Co- and Contra-Variance in C#?
By Amit Kumar in C# on Oct 24 2012
  • kapil gupta
    Aug, 2016 10

    CovarianceEnables you to use a more derived type than originally specified. You can assign an instance of IEnumerable (IEnumerable(Of Derived) in Visual Basic) to a variable of type IEnumerable.ContravarianceEnables you to use a more generic (less derived) type than originally specified. You can assign an instance of IEnumerable (IEnumerable(Of Base) in Visual Basic) to a variable of type IEnumerable.

    • 0

Most Popular Job Functions


MOST LIKED QUESTIONS