in C# it is possible to write
typeof(IInterface<>).
Is there something similar in C++/CLI?
ISYMessageDispatcher<>::typeid
doesn’t compile because the compiler crashes.

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When I test it (using Visual Studio 2010 SP1), this doesn’t crash the compiler, it’s simply a syntax error.
Attempting to compile gives:
For a workaround, see my answer to a related question “How to check a generic type in C++/CLI?”