A practical guide on using `ActivatorUtilitiesConstructorAttribute` in .NET to control which constructor `ActivatorUtilities` selects when a class has multiple constructors. By decorating the desired constructor with the attribute, developers can explicitly guide the dependency injection system without changing the calling code. The post walks through a `Person` class with three constructors and demonstrates how the attribute changes which one gets invoked.
Table of contents
Registering a Type and the DependenciesUsing the ActivatorUtilitiesConstructor Attribute2 Impressions