Differences between C++ Templates and C# Generics

Hi Community,

Yesterday during my presentation at TechEd I was asked by someone in the audience, if C# Generics were similar to C++ templates and I said… “The syntax might be similar but they’re different, and C++ templates have been with us for a long time now, actually… C# has borrowed from some other languages certain features – I’m not gonna mention which ones, in the case of C# Generics’ syntax it’s a bit C++ like”.  I told the person who asked me the question to discuss this in more detail after the session, but unfortunately he left while I was answering some post session questions. There are a couple of papers below which explain this in detail.

So this blog post is to clarify a bit my statement as previously mentioned.

Best Regards,

Angel

Leave a Reply

Your email address will not be published. Required fields are marked *