0

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?

0

1 Answer 1

5

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.