Re: Sending a struct to embeded CPU over the Ethernet
- From: "Ben Voigt [C++ MVP]" <rbv@xxxxxxxxxxxxx>
- Date: Mon, 24 Sep 2007 18:00:30 -0500
"Eitan" <Eitan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:27853735-BAB6-47B2-90AD-2E7D557DC74B@xxxxxxxxxxxxxxxx
Hello,
I need to send a "struct" to an embeded CPU over the Ethernet.
The struct is defined like this:
[Serializable]
public struct MyStruct
{
public double dVar1;
public bool bVar2;
public int nVar3;
}
What would we the best way to pack it into an "array" and send it? Would
that be through Marshal.Copy!? or any other more effiecient way?
BitConverter and a byte[] the most straightforward.
Thanks
EitanB
.
- Prev by Date: do release builds have the same amount of info in exceptions? e.g. will exceptions cought in release builds contain stack trace etc.?
- Next by Date: Re: Tidy up blank methods
- Previous by thread: do release builds have the same amount of info in exceptions? e.g. will exceptions cought in release builds contain stack trace etc.?
- Next by thread: Re: Sending a struct to embeded CPU over the Ethernet
- Index(es):
Relevant Pages
|