I am working on a project where a lot of the data classes look like this:
[DataMember]
public List<SpecialOpeningHours> SpecialOpeningHours { get; set; } = new List<SpecialOpeningHours>();
I've never seen this before and would normally just do this:
[DataMember]
public List<SpecialOpeningHours> SpecialOpeningHours { get; set; }
Can anyone explain why the list in instantiated in this way and whether or not there is some advantage? It doesn't seem to make any difference in use. I am using Dapper and get the same result populating the list either way.