Re: Delegates, Generic Methods and algorithms - Functional versus Procedural

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



less powerful than C++ templates
No; just different. C++ templates are essentially duck-typed; how do
you know that just because a member is called the same it has the same
purpose? Also - C++ templates are compile-time, so you can't use them
with dynamic types. C# generics are a runtime feature : as long as
your type meets the formal constraints, you can use them.
The only limitation I've ever really found with generics is the lack
of support for math operators and non-default constructors, but I've
solved both of those problems in a reusable way.

Re anon delegates - lambdas makes all this a lot friendlier.

I am a convert to the functional side of C# 3; I think it makes things
a lot easier...

Marc
.