Original Post
🔒 Locked
Binary Data in C#
Advertisement
short ValueAsInt16 = .... ;byte[] ValueAsBytes = BitConverter.GetBytes(ValueAsInt16);byte[] ValueAsBytes = .... ;short ValueAsInt16 = BitConverter.ToInt16(ValueAsBytes, 0);is this .NET 2.0 only or 1.1 as well? no clue, i'm working on vc# 2005..
MemoryStream MyStreamer = new MemoryStream(this.TheClients[TheClient].TheBuffer); BinaryReader MyBinaryReader = new BinaryReader(MyStreamer);OIC, you gotta use MemoryStream with BinaryReader (Makes sence since BinaryReader takes in a stream, and MemoryStream makes a stream out of a byte array).
@davepermen
Neat, I'm checking that out. :P
Edit: I'm not sure if your question was at me or your code, but I'm working in VC#2005 aswell, so I'm using .NET 2.0.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement