ole*_*sii 9 .net c# ilist generic-list
出于好奇,通用List <>实现非通用接口IList的原因是什么?
示例代码
IList<int> list = new List<int>();
list.Add(1);
//compiles but ArgumentException thrown at run time
((IList)list).Add(new object());
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2680 次 |
| 最近记录: |