is inaccessible due to its protection level
-
I am getting the following error when trying to compile this code: H:\Grid Project\Alchemi-1.0.4-src\src\Alchemi.ManagerServiceController\ManagerMainForm.cs(61): 'ManagerTemplateForm.components' is inaccessible due to its protection level Here is the code that I am working with. I have a comment on the line where the error is thrown.
#region Alchemi copyright and license notice
/*
* Alchemi [.NET Grid Computing Framework]
* http://www.alchemi.net
*
* Title : ManagerMainForm.cs
* Project : Alchemi Manager Application
* Created on : 2003
* Copyright : Copyright © 2006 The University of Melbourne
* This technology has been developed with the support of
* the Australian Research Council and the University of Melbourne
* research grants as part of the Gridbus Project
* within GRIDS Laboratory at the University of Melbourne, Australia.
* Author : Akshay Luther (akshayl@csse.unimelb.edu.au), Rajkumar Buyya (raj@csse.unimelb.edu.au), and Krishna Nadiminti (kna@csse.unimelb.edu.au)
* License : GPL
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation;
* See the GNU General Public License
* (http://www.gnu.org/copyleft/gpl.html) for more details.
*
*/
#endregionusing System;
using System.ComponentModel;
using System.Reflection;
using System.ServiceProcess;
using System.Threading;
using System.Windows.Forms;
using Alchemi.Core;
using Alchemi.Core.Manager;
using Alchemi.Manager;
using log4net;// Configure log4net using the .config file
[assembly: log4net.Config.XmlConfigurator(Watch=true)]namespace Alchemi.ManagerService
{
public class ManagerMainForm : ManagerTemplateForm
{
public const string serviceName = "Alchemi Manager Service";public ManagerMainForm():base() { InitializeComponent(); this.Text = "Alchemi Manager Service Controller"; Logger.LogHandler += new LogEventHandler(LogHandler); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.components = new System.ComponentModel.Container(); **//Here is where it errors out at** System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ManagerMainFo
-
I am getting the following error when trying to compile this code: H:\Grid Project\Alchemi-1.0.4-src\src\Alchemi.ManagerServiceController\ManagerMainForm.cs(61): 'ManagerTemplateForm.components' is inaccessible due to its protection level Here is the code that I am working with. I have a comment on the line where the error is thrown.
#region Alchemi copyright and license notice
/*
* Alchemi [.NET Grid Computing Framework]
* http://www.alchemi.net
*
* Title : ManagerMainForm.cs
* Project : Alchemi Manager Application
* Created on : 2003
* Copyright : Copyright © 2006 The University of Melbourne
* This technology has been developed with the support of
* the Australian Research Council and the University of Melbourne
* research grants as part of the Gridbus Project
* within GRIDS Laboratory at the University of Melbourne, Australia.
* Author : Akshay Luther (akshayl@csse.unimelb.edu.au), Rajkumar Buyya (raj@csse.unimelb.edu.au), and Krishna Nadiminti (kna@csse.unimelb.edu.au)
* License : GPL
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation;
* See the GNU General Public License
* (http://www.gnu.org/copyleft/gpl.html) for more details.
*
*/
#endregionusing System;
using System.ComponentModel;
using System.Reflection;
using System.ServiceProcess;
using System.Threading;
using System.Windows.Forms;
using Alchemi.Core;
using Alchemi.Core.Manager;
using Alchemi.Manager;
using log4net;// Configure log4net using the .config file
[assembly: log4net.Config.XmlConfigurator(Watch=true)]namespace Alchemi.ManagerService
{
public class ManagerMainForm : ManagerTemplateForm
{
public const string serviceName = "Alchemi Manager Service";public ManagerMainForm():base() { InitializeComponent(); this.Text = "Alchemi Manager Service Controller"; Logger.LogHandler += new LogEventHandler(LogHandler); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.components = new System.ComponentModel.Container(); **//Here is where it errors out at** System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ManagerMainFo
there are two possibilities which mean the same... 1. you forgot to specify the protection level of the component field in your managertemplateform which means by default that it is set to private 2. you didn't forget it but specify it to private... Then if you want it to be not accessible by other class than children of the managertemplateform, you specify the protection level to protected... if you agree that any classes access to it, choose public.
enjoy the code with you is my priority, Blaise Braye