• Saves Valuable Time
  • Trusted Accuracy for 15 Years
  • 15-Day Money-Back Guarantee

C# Equivalent to C++ Type Discovery

C++ C#
bool b = dynamic_cast<Foo*>(f) != nullptr; bool b = f is Foo;

C++ 'typeid' is only equivalent to C# 'typeof' for template type parameters:

C++ C#
template<typename T>
void method()
    std::type_info t = typeid(T);
private void method<T>()
    Type t = typeof(T);

Use C++ to C# Converter to convert from C++ to C#.     

Additional resource: C++ and C# Equivalents

Copyright © 1997 – 2019 Tangible Software Solutions, Inc.