Click here to Skip to main content
15,889,838 members
Home / Discussions / C#
   

C#

 
GeneralRe: FileSystemWatcher Question Pin
#realJSOP13-Feb-10 0:18
mve#realJSOP13-Feb-10 0:18 
AnswerRe: FileSystemWatcher Question Pin
Abhinav S13-Feb-10 0:07
Abhinav S13-Feb-10 0:07 
GeneralRe: FileSystemWatcher Question Pin
#realJSOP13-Feb-10 0:17
mve#realJSOP13-Feb-10 0:17 
QuestionHow to set ToolTip to ToolStripButton? Pin
arichikato12-Feb-10 18:44
arichikato12-Feb-10 18:44 
AnswerRe: How to set ToolTip to ToolStripButton? Pin
Saksida Bojan12-Feb-10 19:46
Saksida Bojan12-Feb-10 19:46 
AnswerMessage Closed Pin
12-Feb-10 20:43
stancrm12-Feb-10 20:43 
GeneralRe: How to set ToolTip to ToolStripButton? Pin
arichikato13-Feb-10 7:47
arichikato13-Feb-10 7:47 
QuestionInaccessible due to its protection level [modified] Pin
ASPnoob12-Feb-10 16:38
ASPnoob12-Feb-10 16:38 
Hi All,
I am having the error message "Inheritance.TeamManagement.salary is inaccessible due to its protection level" when I build my program. I have done some research into this problem and some of the articles I was reading say that the problem could be caused by the constructor having been declared as private instead of public. I did not declare my constructor as private so I really don't know what to do now. The following is a snippet of code from my program. Please take a look and help point out what I am doing wrong.

using System;
using System.Collections.Generic;
using System.Text;

namespace Inheritance
{
public class TeamManagement
{
private string name;
private double salary;

public TeamManagement(string nameVal, double salaryVal)
{
name = nameVal;
salary = salaryVal;
}

public string ToString()
{
return "TeamManagement[name=" + name + ",salary=" + salary + "]";
}

}
}

namespace Inheritance
{
public class Executive:TeamManagement
{
private string role;


public Executive(string nameVal, double salary, string roleVal):base( nameVal, salaryVal)
{
role = roleVal;
}

public
string ToString()
{
return "Executive[name=" + name + ",salary=" + salary + "]";
}

}
}


using System;
using System.Collections.Generic;
using System.Text;

namespace Inheritance
{
public class Owner:Executive
{

public Owner(string nameVal, double salary, string roleVal):base( nameVal, salaryVal,roleVal)
{
}

public
string ToString()
{
return "Owner[name=" + name + ",salary=" + salary + "]";
}

}
}
modified on Friday, February 12, 2010 11:06 PM

AnswerRe: Inaccessible due to its protection level Pin
Wes Aday12-Feb-10 17:14
professionalWes Aday12-Feb-10 17:14 
GeneralRe: Inaccessible due to its protection level Pin
ASPnoob12-Feb-10 17:25
ASPnoob12-Feb-10 17:25 
GeneralRe: Inaccessible due to its protection level Pin
Wes Aday12-Feb-10 17:37
professionalWes Aday12-Feb-10 17:37 
AnswerRe: Inaccessible due to its protection level Pin
DaveyM6912-Feb-10 22:56
professionalDaveyM6912-Feb-10 22:56 
AnswerRe: Inaccessible due to its protection level Pin
Luc Pattyn13-Feb-10 1:26
sitebuilderLuc Pattyn13-Feb-10 1:26 
QuestionCall a .aspx web-form from Microsoft CRM 4 Pin
quercus12-Feb-10 12:56
quercus12-Feb-10 12:56 
QuestionTTF file format Pin
sduhd12-Feb-10 12:13
sduhd12-Feb-10 12:13 
AnswerRe: TTF file format Pin
harold aptroot12-Feb-10 12:52
harold aptroot12-Feb-10 12:52 
QuestionWindows service & Timers Pin
koleraba12-Feb-10 10:06
koleraba12-Feb-10 10:06 
AnswerRe: Windows service & Timers Pin
PIEBALDconsult12-Feb-10 10:38
mvePIEBALDconsult12-Feb-10 10:38 
GeneralRe: Windows service & Timers Pin
koleraba12-Feb-10 11:01
koleraba12-Feb-10 11:01 
GeneralRe: Windows service & Timers Pin
PIEBALDconsult12-Feb-10 14:09
mvePIEBALDconsult12-Feb-10 14:09 
GeneralRe: Windows service & Timers Pin
koleraba12-Feb-10 22:36
koleraba12-Feb-10 22:36 
GeneralRe: Windows service & Timers Pin
PIEBALDconsult13-Feb-10 3:20
mvePIEBALDconsult13-Feb-10 3:20 
AnswerRe: Windows service & Timers Pin
DaveyM6912-Feb-10 10:47
professionalDaveyM6912-Feb-10 10:47 
GeneralRe: Windows service & Timers Pin
koleraba12-Feb-10 11:04
koleraba12-Feb-10 11:04 
QuestionRe: Windows service & Timers Pin
koleraba12-Feb-10 12:39
koleraba12-Feb-10 12:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.