I'm writing a class that does a lot of reading and writing from a stream It needs to write bytes, sbytes, and signed or unsigned int32 and 16. I have been having trouble finding ways to read/write evrything I need to.
UInt16 and UInt32 were easy
when i looked for a way to read a byte I found the method readbyte, but it returns an int not a byte :confused: (I could cast it, but would that work?)
Then I got to Int16,Int 32 and sbyte and couldn't find any way to read signed bytes.
Could Somebody Help me with this.:icon_confused: :icon_confused: :icon_confused:

I was looking on google again and found the classes BinaryReader/Writer and I think I can get it working that way. I guess I should have looked a little longer. :icon_redface:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.