Kii
Kii

Reputation: 782

Determining whether an assembly is loaded from a byte array

Given an Assembly object, how to determine whether this assembly is loaded by Assembly.Load(byte[])?

Currently, I use Module.FullyQualifiedName. According to MSDN:

If the assembly for this module was loaded from a byte array then the FullyQualifiedName for the module will be: <Unknown>.

But apparently the value is depends on language of the system...

Upvotes: 1

Views: 208

Answers (1)

Eren Ers&#246;nmez
Eren Ers&#246;nmez

Reputation: 39085

How about bool isFromBytes = module.FullQualifiedName.StartsWith("<")

Upvotes: 1

Related Questions