Yeah, I tried using reflection, but this still requires you have a reference to the underlying type. In the end I just switched the project to VB.net, and it works. I still find it surprising that there is something vb.net can do that c# can't. Anyway, thanks for your input.