To get an assembly from a type in c# I'd use the following
typeof(MyTypeOrClass).Assembly
But how do I achieve this in C++?
To get an assembly from a type in c# I'd use the following
typeof(MyTypeOrClass).Assembly
But how do I achieve this in C++?
You can do it by using "typeid":
using namespace System;
namespace NS
{
public ref class Foo
{
};
}
int main()
{
System::Reflection::Assembly^ a = NS::Foo::typeid->Assembly;
Console::WriteLine(a);
}