Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. double [] via tcp/ip

double [] via tcp/ip

Scheduled Pinned Locked Moved C#
tutorialcsharpgraphicssysadmindata-structures
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wibblewibblewibble
    wrote on last edited by
    #1

    Hi I was wondering if anyone has any idea how to solve the following (I am coming from a C background and trying to tackle this in C#). I have a TCP/IP client/server implemented. Everything that I have seen requires the data to be sent in a byte array (or as a single byte). I need to be able to send an Int32 (i.e. a 4-element byte array represenation of the integer) or a vector of double (or float) values. I haven't been able to find anything that will allow me to copy an integer/float into it's equivalent byte representation (for example the equivalent of memcpy in C). Any pointers would be greatly appreciated! Thanks Barry

    H 1 Reply Last reply
    0
    • W wibblewibblewibble

      Hi I was wondering if anyone has any idea how to solve the following (I am coming from a C background and trying to tackle this in C#). I have a TCP/IP client/server implemented. Everything that I have seen requires the data to be sent in a byte array (or as a single byte). I need to be able to send an Int32 (i.e. a 4-element byte array represenation of the integer) or a vector of double (or float) values. I haven't been able to find anything that will allow me to copy an integer/float into it's equivalent byte representation (for example the equivalent of memcpy in C). Any pointers would be greatly appreciated! Thanks Barry

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      See the BitConverter class in the .NET Framework SDK.

      Microsoft MVP, Visual C# My Articles

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups