Inconsistent accessibility: field type 'world' is less accessible than field 'frmSplashScreen

前端 未结 4 1360
一向
一向 2020-12-15 17:26

I have this error called Inconsistent accessibility:

field type \'world\' is less accessible than field \'frmSplashScreen\'

In

4条回答
  •  再見小時候
    2020-12-15 18:18

    Generally this happens because your field is private. You must change it to public:

    public world currentWorld;
    

    For more on this, take a look here: Restrictions on Using Accessibility Levels (C# Reference)

提交回复
热议问题