Ark.DelegateConstraint 0.1.1

This package ultimately lets you constrain generic type parameters to the `System.Delegate` type. Just replace the problematic constraints and types with the `Ark.IDelegate` stubs which are wiped away without a trace after the assembly is compiled.

If you try to write `class MyClass<T> where T : Delegate { }` the C# compiler won't let you.

Install this package and replace that code with `class MyClass<T> where T : Ark.IDelegate { }`.

If you need to refer to a concrete delegate-constrained class in the same library then instead of `MyClass<Action>` you'd need to write `MyClass<Ark.IDelegate<Action>>` so that the code compiles. Don't worry - all these stubs are removed from the resulting assembly.

Install-Package Ark.DelegateConstraint -Version 0.1.1
dotnet add package Ark.DelegateConstraint --version 0.1.1
<PackageReference Include="Ark.DelegateConstraint" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ark.DelegateConstraint --version 0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

Stubs now have almost all Delegate methods (static methods, operators, etc).
Changed stubs from interfaces to abstract classes without changing the class names.
Improved ildasm.exe path detection.


This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.1.1 1,135 2/10/2013
0.1.0 685 2/7/2013