The two properties are declared in Instructor.cs as follows:
public DateTime HireDate { get; private set; }
public virtual OfficeAssignment OfficeAssignment { get; private set; }
When I try to build the project, I get these errors:
C:\{snip}\IndexTests.cs(37,17): error CS0200: Property or indexer 'Instructor.HireDate' cannot be assigned to -- it is read only
C:\{snip}\Delete.cs(75,17): error CS0272: The property or indexer 'Instructor.OfficeAssignment' cannot be used in this context because the set accessor is inaccessible
If I remove private from both setters, the solution builds fine. Is this the proper fix, or do those properties need to keep their setters as private? If the former, shall I submit a pull request?
The two properties are declared in
Instructor.cs
as follows:When I try to build the project, I get these errors:
If I remove
private
from both setters, the solution builds fine. Is this the proper fix, or do those properties need to keep their setters asprivate
? If the former, shall I submit a pull request?Thanks,
Jon
Environment info: