Question

I have this object in my form

When I went to build my solution, I got the following errors.

In MainForm.Designer.cs

public fCraft.ServerGUI.ConsoleBox console;

Error   1   'fCraft.ServerGUI.ConsoleBox' is inaccessible due to its protection level   C:\Users\JILL\Documents\Visual Studio 2010\Projects\LegendCraft-master\ConfigGUI\MainForm.Designer.cs   4099    33  ConfigGUI

Error   2   Inconsistent accessibility: field type 'fCraft.ServerGUI.ConsoleBox' is less accessible than field 'fCraft.ConfigGUI.MainForm.console'  C:\Users\JILL\Documents\Visual Studio 2010\Projects\LegendCraft-master\ConfigGUI\MainForm.Designer.cs   4099    44  ConfigGUI

Again again in MainForm.Designer.cs

this.console = new fCraft.ServerGUI.ConsoleBox();
Error   5   'fCraft.ServerGUI.ConsoleBox.ConsoleBox()' is inaccessible due to its protection level  C:\Users\JILL\Documents\Visual Studio 2010\Projects\LegendCraft-master\ConfigGUI\MainForm.Designer.cs   312 28  ConfigGUI

How am I supposed to fix this error so that I may release my program?

Was it helpful?

Solution

The ConsoleBox class needs to be declared public to be used in another assembly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top