michielbuddingh + typing   2

unconstrained-melody - Project Hosting on Google Code
" ... There are various useful things that can be done with generic methods/classes where there's a type constraint of "T : enum" or "T : delegate" - but unfortunately, those are prohibited in C#.

This utility library works around the prohibitions using ildasm/ilasm, by building the code with "fake" constraints and then rewriting the constraints afterwards. The resulting binary is usable from "normal" C#; the C# compiler understands the constraints just fine, even if it won't let you express them. ... "
csharp  generics  typing 
february 2010 by michielbuddingh

Copy this bookmark:



description:


tags: