I have this error called Inconsistent accessibility:
field type \'world\' is less accessible than field \'frmSplashScreen\'
In
also , I got such an error with public
access modifier. The solution was to add {get;set;}
getter and setter to properties
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)
This can also happen when you have not initialized your class "world" as public
you should do :
public class world
Instead of :
class world
you can't use private
access specifier in that statement
Public class world
will solve this problem