In the example below, why does the public ctor get picked instead of the default protected ctor?
This will fail because of this - it will succeed if the default ctor gets picked
void Main()
{
JsonConvert.DeserializeObject<List>("[{\"id\":2}]").Dump();
}
public class Tagged : Tag
{
protected Tagged() : base() { }
public Tagged(Tag tagDefinition)
{
Id = tagDefinition.Id;
}
}
public abstract class Tag
{
public int Id { get; set; }
}