Cannot apply indexing with [] to an expression of type ICollection

后端 未结 2 1422
醉话见心
醉话见心 2021-01-21 04:16

Can someone please provide code to fix this error?

\"Cannot apply indexing with [] to an expression of type \'ICollection\'

Essentially, I\'m trying to

2条回答
  •  花落未央
    2021-01-21 05:00

    Use IList

    public  class A
    {
       public int Name { get; set; }
       public virtual IList Bs { get; set; }
    }
    

提交回复
热议问题