How to solve the Error: Inconsistent accessibility: parameter type for generic c# interface?

后端 未结 5 865
不知归路
不知归路 2021-01-04 06:25

On writting this code into my project i am getting the error that

Error 1 Inconsistent accessibility: field type \'System.Collections.Gene

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-04 07:03

    My guess is that the Childrendata class is private (or internal, or implicitly internal by not specifying a visibility modifier)

    Since List m_children is public, Childrendata needs to be public as well.

    Change Childrendata to public and you should be fine.

提交回复
热议问题