943,522 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Marked Solved
  • Views: 1743
  • C# RSS
Aug 30th, 2008
0

question about reading from/writing to a stream

Expand Post »
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 (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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
curt22 is offline Offline
56 posts
since Sep 2007
Aug 30th, 2008
0

Re: question about reading from/writing to a stream

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.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
curt22 is offline Offline
56 posts
since Sep 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Inheritence question :(
Next Thread in C# Forum Timeline: Multi Threading





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC