Parameter is less accessible than method

后端 未结 5 1980
既然无缘
既然无缘 2021-01-04 05:21

I\'m trying to pass a list from one form class to another. Here\'s the code:

List myArgus = new List();

private void btnLogin_Cl         


        
5条回答
  •  伪装坚强ぢ
    2021-01-04 06:06

    The constructor of BranchOverview is public, which means that all types involved in its formal parameter list must also be public. Most probably you have not provided an accessibility specification for Branch, i.e. you have written

    class Branch { ... }
    

    which means that Branch is internal.

提交回复
热议问题