'Inconsistent accessibility' with multiple classes

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2008
Posts: 1
Reputation: LithMaster is an unknown quantity at this point 
Solved Threads: 0
LithMaster LithMaster is offline Offline
Newbie Poster

'Inconsistent accessibility' with multiple classes

 
0
  #1
Aug 8th, 2008
  1. 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:

  1. namespace SmartBackup
  2. {
  3. public partial class BackupConfigurationForm : Form
  4. {
  5. private SmartBackupClass smartBackup;
  6. public BackupConfigurationForm()
  7. {
  8. InitializeComponent();
  9. }
  10. public void SmartBackupLoad(SmartBackupClass smartBackupLoaded)
  11. {
  12. this.smartBackup = smartBackupLoaded;
  13. }
  14. private void BackupConfigurationForm_Load(object sender, EventArgs e)
  15. {
  16.  
  17. }
  18. }
  19. }
'SmartBackupClass' is a class, it has a reference to BackupConfigurationForm

  1. private BackupConfigurationForm backupConfigurationForm;

backupConfigurationForm is created with the function:

  1. public void BackupConfigurationButton()
  2. {
  3. this.backupConfigurationForm = new BackupConfigurationForm();
  4. this.backupConfigurationForm.Show();
  5. this.backupConfigurationForm.LoadSmartBackup(this);
  6. }
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 39
Reputation: nvmobius is an unknown quantity at this point 
Solved Threads: 4
nvmobius nvmobius is offline Offline
Light Poster

Re: 'Inconsistent accessibility' with multiple classes

 
0
  #2
Aug 11th, 2008
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.
Last edited by nvmobius; Aug 11th, 2008 at 8:36 pm.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC