通用接口引用如何接受非泛型对象?

Win*_*der 1 .net c# generics

我有代码

IEnumerable<card> any_object = new card[] { };
Run Code Online (Sandbox Code Playgroud)

哪个card是没有实现的类IEnumerable.我无法理解这段代码是如何工作的?

ant*_*ijn 5

来自C#规范:

在.NET Framework 2.0版中,Array类实现System.Collections.Generic.IList,System.Collections.Generic.ICollection和System.Collections.Generic.IEnumerable通用接口.

所以数组(隐式地)继承自IEnumerable<card>.

我不太明白关于card没有实现的类的评论IEnumberable.本card类并不需要时,它就是你分配变量有实现接口,而不是在它的值的数组.