views:

38

answers:

1

I remember seeing a question on my official MS 70-536 exam that talked about a simple class that was designed to be exposed for COM calling clients and etc. of all the members defined in the classes I chose the answer D. The one that used a generic.

My question to you guys is this: If you were designing a .net custom type that was to be eventually consumed by a com caller or a com type .... of all the guidelines I have read on this subject. Generics is the one .Net topic I would not include in a class for this purpose I would omit such a data member or use something else? Am I right in thinking this. As soon as I saw this question I knew it was generics but I can't seem to prove it. Surely I did not make this up ... generics is a .net feature right?

+4  A: 

COM interop cannot work directly with generics. MSDN:

http://msdn.microsoft.com/en-us/library/ms229590(v=VS.80).aspx

Generics is a .Net feature that COM does not have a concept for, so there can't easily be any interop\marshalling glue to make up for this fact.

chibacity
Ty.Thats another annoying one of my list. :)
IbrarMumtaz