Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="3.4.0-preview-602" />

 ConstructorNotFoundException

Represents a constructor not found exception.
using System; using System.Linq; namespace Stashbox.Exceptions { public class ConstructorNotFoundException : Exception { public ConstructorNotFoundException(Type type, Type[] argumentTypes, Exception innerException = null) : base("Constructor not found for " + type.FullName + " with the given argument types: " + (from t in argumentTypes select t.FullName).Aggregate((string t1, string t2) => t1 + ", " + t2) + ".", innerException) { } public ConstructorNotFoundException(Type type, Exception innerException = null) : base("Constructor not found for " + type.FullName + " with no arguments.", innerException) { } public ConstructorNotFoundException(Type type, Type argument, Exception innerException = null) : base("Constructor not found for " + type.FullName + " with the argument type: " + argument.FullName + ".", innerException) { } } }