Resharper thinks that typecast is redundant, but without typecast the code does not work

此生再无相见时 提交于 2019-12-06 04:43:05

Why does Resharper think the cast is redundant ?

If you think this way:

IList is a ICollection and IDictionary is also a ICollection because both of them implement 'ICollection', Resharper's warning should become clear.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!