I am using a Windows Form MainForm
which calls the following:
FileSystemLayer FSL = new FileSystemLayer();
DatabaseLayer DBL = new DatabaseLayer();
What I want to do:
(inside the DatabaseLayer class)
String SomeString = MainForm.FSL.AnotherString;
The problem
The FileSystemLayer FSL is inaccessible due to its protection level
I've tried
public FileSystemLayer FSL = new FileSystemLayer();
public DatabaseLayer DBL = new DatabaseLayer();
But it gave the result
Inconsistent accessibility: 'DatabaseLayer' is less accessible than field 'MainForm.DBL'
So I'm hoping someone can give me some advice on how to communicate between the two classes.