Why can't I pass List as a parameter to a method that accepts List<object>?

前端 未结 8 416
北恋
北恋 2021-01-11 13:31

The following code gives me this error:

Cannot convert from \'System.Collections.Generic.List\' to \'System.Collections.Generic.List\'.

8条回答
  •  孤城傲影
    2021-01-11 14:05

    Why can't the parameter be of type IList?

    public void FillSmartGrid(IList items)

提交回复
热议问题