[Mono-list] Marshalling byte[]

Neale.Ferguson@SoftwareAG-USA.com Neale.Ferguson@SoftwareAG-USA.com
Wed, 27 Oct 2004 09:42:30 -0400

I have a variable:
byte[] var;

That I wish to pass to a C program. Normally, I could use something =
[MarshalAs(UnmanagedType.ByValArray, SizeConst=3D8)]
byte[] var;

But in my case I do not know the size of the variable until runtime. How =
do I get something like this marshalled at runtime?