M
Martin Greul
Hello!
I don't know the size of the array?
How is the correct way to make it dynamic ?
Like ReDim in Basic?
Have somebody a good example?
Thanks.
Greeting Martin
private void button1_Click(object sender, EventArgs e)
{
Endian.Test_Send();
Endian.Test_Receive();
Byte[] bytesSend = new Byte[1000];
Endian.Test_Send_ByteArrayAsReference(ref bytesSend);
}
public static void Test_Send_ByteArrayAsReference(ref Byte[] bytesSend)
{
int i = 365;
// write in big-endian order, regardless of host order
bytesSend[0] = (Byte)(i >> 24);
bytesSend[1] = (Byte)(i >> 16);
bytesSend[2] = (Byte)(i >> 8);
bytesSend[3] = (Byte)i;
}
I don't know the size of the array?
How is the correct way to make it dynamic ?
Like ReDim in Basic?
Have somebody a good example?
Thanks.
Greeting Martin
private void button1_Click(object sender, EventArgs e)
{
Endian.Test_Send();
Endian.Test_Receive();
Byte[] bytesSend = new Byte[1000];
Endian.Test_Send_ByteArrayAsReference(ref bytesSend);
}
public static void Test_Send_ByteArrayAsReference(ref Byte[] bytesSend)
{
int i = 365;
// write in big-endian order, regardless of host order
bytesSend[0] = (Byte)(i >> 24);
bytesSend[1] = (Byte)(i >> 16);
bytesSend[2] = (Byte)(i >> 8);
bytesSend[3] = (Byte)i;
}