Having noticed a small mistake in my C# code (end of line 4):
Domain.Models.Patient patient = new Domain.Models.Patient
{
PatientId = patientId,
StudyID = studyId,
};
I don’t get any build error, or runtime errors – when there is an errant comma at the end of studyId.
Why is this, and does it really matter?
It doesn’t matter, and it will not cause any compile time error as well. Its true for others as well like enums. It is probably to show, that other items may be added to the object.
Found a Reference – C# Language
Specification:
And