deleyd
asked on
How to pass an explicit array of bytes as a byte array
I have a method that accepts a byte array as a parameter:
private void mymsg(byte[] barray)
{
...
}
which I currently call: byte[] n = { 0x35, 0x04 };
mymsg( n );
I'd like to call it in one step instead of two. Something like this (but without the syntax errors) mymsg( { 0x35, 0x04 } );
What's the proper syntax for this?ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.