I receive the following message when I compile;
unsafe bool Initialize()
{
//You can only take the address of unfixed expression inside of a fixed statement initializer
CInit Data = new CInit();
return SendPacket(&Data.DataPacket,
System.Runtime.InteropServices.Marshal.SizeOf(Data.DataPacket));
}
Why is that?
Another thing:
Imagine I would like to send a similar created object via socket.send() method to a server, socket.send does only accept byte[], how to do that?
Thanks a lot,
stonee
unsafe bool Initialize()
{
//You can only take the address of unfixed expression inside of a fixed statement initializer
CInit Data = new CInit();
return SendPacket(&Data.DataPacket,
System.Runtime.InteropServices.Marshal.SizeOf(Data.DataPacket));
}
Why is that?
Another thing:
Imagine I would like to send a similar created object via socket.send() method to a server, socket.send does only accept byte[], how to do that?
Thanks a lot,
stonee