c# - 实现接口 B 的接口 D 的列表不能被识别为 List
问题描述
解决方案
您可以为 IB 创建通用方法和限制类型:
void ProcessListOfIB<T>(List<T> list) where T:IB
{
// Some code
}
推荐阅读
- angular - Angular App 在 Edge 和 Firefox 中冻结
- java - RxJava - 缓存 Observable 更新并发出最大值
- python - 为什么'is'对于Python中的不同实例返回true
- pyspark - 在分组数据上使用 PySpark Imputer
- python - 打开并阅读:来自文件夹 python 的多个 xml 文件
- arrays - 用特殊顺序的字符串填充二维数组
- c - 父进程,创建2个子进程并使用管道发送数据
- output - GCS 存储桶中的 Google Cloud Composer DAG 相对目录
- c# - 如何在 C# 中读取以 view-source 开头的 URL
- discord.js - Collection#find:改为传递函数