Tuesday, 13 August 2013

C# OOP inheritance and polymorphism

C# OOP inheritance and polymorphism

I am having trouble to fix the errors in my object oriented program in C#.
The program has 9 classes and in the one class. The Error is Inconsistent
accessibility: parameter type 'Employee.Employee' is less accessible than
method 'Employee.EmployeeInput.CollectEmployeeInfo(Employee.Employee)' on
the coding
public static void CollectEmployeeInfo(Employee theEmployee)
{
theEmployee.Firstname = InputUtilities.getStringInputValue("First
Name");
theEmployee.Lastname = InputUtilities.getStringInputValue("Last
name");
theEmployee.Gender = InputUtilities.getCharInputValue("Gender");
theEmployee.Dependents = InputUtilities.getIntegerInputValue("#
Dependents");
}
the CollectEmployeeInfo is what is showing the error and I am not sure
what has to be done to the other classes to fix the error. Any help would
be greatly appreciated

No comments:

Post a Comment