Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting Assembly to byte[]

I am trying to convert an assembly compiled using ICodeCompiler into byte[]. How can I do that? Also what is safest way to transfer this assembly to some remote location (client)? Note that Symmetric Key encyrption is not a possiblity.

Update: What about this?

        BinaryFormatter formatter = new BinaryFormatter();
        MemoryStream assemblyStream = new MemoryStream();
        formatter.Serialize(assemblyStream, loAssembly);

How do I transfer the byte[] ?

like image 797
Pushkar Avatar asked Sep 12 '26 07:09

Pushkar


1 Answers

Last time I checked files were usually stored as bytes on a hard drive.

So what is your exact problem?

like image 78
leppie Avatar answered Sep 13 '26 20:09

leppie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!