structure to byte array in c#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swts
    New Member
    • Feb 2008
    • 16

    #1

    structure to byte array in c#

    hi,
    i need to know if there s a mechanism to convert structure into a byte array.
    i have a structure that has 4 byte arrays. i need to transmit this across using socket connection,can i convert this into byte array prior to transmission??. each of these structures go into the payload of each packet.kindly help
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Supposidly Marshalling can do it for you (Marshal by Reference).
    Me? I usually just do it manually, converting everything to bytes.

    Comment

    Working...