I discovered yesterday that I can’t have a Class that uses a field named “Type” this is probably reserved.
Although the field may be reserved you still can’t set anyObject.Type if it doesn’t have a Type field defined as a public string. Ignoring any getters and setters and jumping directly to changing YourObject to “whatever” string.
Try this for yourself. Define a Type field and try setting it.
This should be reported to Microsoft so no one will use “Type” as a field in the future, there is no warnings/errors along trying to define it.
public Point_Extended(Point p, booking b)
{
this.ID = p.ID;
this.Type = p.Type;
this.Status = p.Status;
this.Size = p.Size;
this.Coords = p.Coords;
this.Color = p.Color;
this.BuildingID = p.BuildingID;
this.Login = b.Login;
this.Starts = b.Starts;
this.Hours = b.Hours;
this.BookingID = b.ID;
}
Nevermind.
It was the ToString() override representation that confused me to think the Type was changed.