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

user1761786 picture user1761786 · Oct 20, 2012 · Viewed 76.6k times · Source

I have this error called Inconsistent accessibility:

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

In my code there is a public partial class called frmSplashScreen

There is also a public class called world

The line that caused the error was:

private world currentWorld; 

The above line is in the class frmSplashScreen

What is causing the problem?

Answer

BasssS picture BasssS · Nov 7, 2013

This can also happen when you have not initialized your class "world" as public

you should do :

public class world

Instead of :

class world