IList to IList

后端 未结 8 1032
猫巷女王i
猫巷女王i 2021-01-05 00:28

I have a few classes:

class Vehicle
{
}

class Car : Vehicle
{
}

I have a list of the derived class: IList cars;

8条回答
  •  太阳男子
    2021-01-05 01:00

    You can also take a look on Krzysztof's Cwalina article, Simulated Covariance for .NET Generics

提交回复
热议问题