954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

'Inconsistent accessibility' with multiple classes

Error	2	Inconsistent accessibility: parameter type 'SmartBackup.SmartBackupClass' is less accessible than method 'SmartBackup.BackupConfigurationForm.SmartBackupLoad(SmartBackup.SmartBackupClass)'	C:\Documents and Settings\Mantas\My Documents\Visual Studio 2008\Projects\SmartBackup\SmartBackup\BackupConfigurationForm.cs	19	21	SmartBackup


Hi all, I was just wondering what the above error message means in laymans terms?
It relates to this code:

namespace SmartBackup
{
    public partial class BackupConfigurationForm : Form
    {
        private SmartBackupClass smartBackup;
        public BackupConfigurationForm()
        {
            InitializeComponent();
        }
        public void SmartBackupLoad(SmartBackupClass smartBackupLoaded)
        {
            this.smartBackup = smartBackupLoaded;
        }
        private void BackupConfigurationForm_Load(object sender, EventArgs e)
        {

        }
    }
}

'SmartBackupClass' is a class, it has a reference to BackupConfigurationForm

private BackupConfigurationForm backupConfigurationForm;


backupConfigurationForm is created with the function:

public void BackupConfigurationButton()
        {
            this.backupConfigurationForm = new BackupConfigurationForm();
            this.backupConfigurationForm.Show();
            this.backupConfigurationForm.LoadSmartBackup(this);
        }
LithMaster
Newbie Poster
1 post since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

This is a problem with your use of public, protected, and private. Probably somewhere in your inheritance chain. Most likely forgot to add public infront of a class declaration somewhere.

nvmobius
Light Poster
39 posts since Jul 2008
Reputation Points: 11
Solved Threads: 4
 

thank you very much, its hours tryin to figure that out. thanks a lot

xolisamthobeli
Newbie Poster
1 post since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You