0

Is it possible to load the Assembly into Byte Array only partially, in the sense that: either: only specific class is loaded (e.g of given name and which implements given interface) or: whole assembly is loaded except specific class

In my solution implementation of the whole Assembly loaded into ByteArray during App Runtime looks like this:

byte[] assemblyBytes = File.ReadAllBytes(assemblyFilename);
Assembly LoadedAssembly = Assembly.Load(assemblyBytes);

Thank you in advance for your help,

Nate Eldredge
  • 48,811
  • 6
  • 54
  • 82
Lukasz
  • 11
  • 1
    Never heard of. But others correct me if i'm wrong. I think the static constructor of a class is only called when you ever use (directly/indirectly) a class. Meaning, it only loads the classes you actually use. – Jeroen van Langen Feb 19 '23 at 15:45

0 Answers0