Reputation: 29009
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++?
Upvotes: 0
Views: 151
Reputation: 3684
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);
}
Upvotes: 1