tags:

views:

190

answers:

2

The title says it all, basically. What is the current state of the art on duck typing for C# below version 4.0?

I know about Duck Typing Project, I know that BLTookit has something to that end, but I'd like to know if I'm missing something really wicked apart from DLR languages and C# 4.0.

The inevitable:

Duck

+2  A: 

Use iron python inside the c# code. We've used it very successfully.

Preet Sangha
+2  A: 

You can use the DLR for dynamic type capabilities pre .NET 4, though you can't use the dynamic keyword so it can be a pain. The remaining "Duck Typing" functionality looks like it can be had through something like Castle Dynamic Proxy.

Firestrand