C#协变和逆变 - 译
生活随笔
收集整理的這篇文章主要介紹了
C#协变和逆变 - 译
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
https://docs.microsoft.com/zh-cn/dotnet/csharp/programming-guide/concepts/covariance-contravariance/
Covariance and Contravariance?
協變和逆變
implicit reference conversion
隱式引用轉換
array types
數組類型
delegate types
委托類型
generic type
泛型類型
argument
參數,自變量
assignment compatibility
分配兼容性
reverses it
反之
implicit conversion
隱式轉換
derived type
派生類型
is not type safe
不是類型安全
generic interfaces
泛型接口
總結
以上是生活随笔為你收集整理的C#协变和逆变 - 译的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C#中协变和逆变的基本概念、List和L
- 下一篇: C# main函数的返回值 - 译