Builds on types of the ConstTypeArgs.Core library to provide const type arguments that allow you to use generic parameters to "pass" delegates to generics. This provides an analog to type specialization in C++, and can be used for scenarios such as: * Static polymorphism, * Eliminating unnecessary instance constructors, * "Passing" values to type initializers, * And a more.
$ dotnet add package ConstTypeArgs.DelegatesConst type arguments (also called const type args) are types used to "pass" static values to generics through type parameters. These values can be used in static contexts, such as static constructors, static fields, and static methods. This can provide enhanced type safety, static polymorphism, performance improvements, and more.
You can use types in the ConstTypeArgs.Delegates namespaces for passing delegates as const type arguments.
Usage scenarios include: