Hi Folks,
I'm working on a c# windows form application, that builds code on the fly and makes a new exe progamme with ICodeCompiler.

My problem is that;

i can bind a string variable into source code to build as below;


sourcecode + =" string myvar='hello world'; ";

i can also bind array as below;

sourcecode + =" byte[] myBytevar; myBytevar[0]=144; ";

but when i have got a huge byte array to pass i can't because it contains binary code of any other file.

sourcecode + ="
byte[] myBytevar;

how can i pass a huge public byte array into the new exe source code easily??

Is it also possible to bind a CryptoStream typed variable into code??

All your helps would be great.

Thanks in advance

no one has an idea??

come on it should not be that difficult!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.