嵌套泛型参数IList<IList<Object>>如何传参

在调用第三方库的时候,有这么一个泛型参数,如下图:

按照经验,使用两个List嵌套声明变量即可:

IList<IList<AnnotatedPoint2D>>  outImageGrid2 = new List<List<AnnotatedPoint2D>>();

//这里提示编译错误:无法隐式转换

最后,在stackflow找到一个解决方法:

IList<IList<AnnotatedPoint2D>>  outImageGrid2 = new List<IList<AnnotatedPoint2D>>();

原文地址:https://www.cnblogs.com/liangxiarong/p/11824376.html