Check if object is of a given type - elegant way (C++/CLI)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In C# I can write:
if(someObj is someType)
{ .. }

In C++/CLI I used:
if(someObj->GetType()->Eqals(someType::typeid))
{ .. }

Is there some other way to do this stuff in C++/CLI? Perhaps something more
elegant, like C# "is" keyword?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top