Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
QuestionHow to get an array of Pens in a user defined class to "work" in a WinForm? Pin
Anonymous5-Oct-05 16:39
Anonymous5-Oct-05 16:39 
AnswerRe: How to get an array of Pens in a user defined class to "work" in a WinForm? Pin
Mohamad Al Husseiny5-Oct-05 18:59
Mohamad Al Husseiny5-Oct-05 18:59 
Questiondesinger for winforms? Pin
microsoc5-Oct-05 16:36
microsoc5-Oct-05 16:36 
AnswerRe: desinger for winforms? Pin
David Stone5-Oct-05 20:20
sitebuilderDavid Stone5-Oct-05 20:20 
QuestionWhy BinaryReader don't have the EOF property Pin
ediazc5-Oct-05 16:04
ediazc5-Oct-05 16:04 
AnswerRe: Why BinaryReader don't have the EOF property Pin
Guffa5-Oct-05 19:23
Guffa5-Oct-05 19:23 
GeneralRe: Why BinaryReader don't have the EOF property Pin
ediazc6-Oct-05 5:14
ediazc6-Oct-05 5:14 
GeneralRe: Why BinaryReader don't have the EOF property Pin
Guffa6-Oct-05 6:12
Guffa6-Oct-05 6:12 
ediazc wrote:
What happen when EOF is reached? data is null?

No. You simply get an array that contains less bytes that you requested.

The way to detect end of stream is to examine the length of the array. If the length is shorter than the number of bytes requested, you have reached the end of the stream. The array will contain the last remaining bytes of the stream. If you already read all data up to the end, the length of the array will be zero.

You have to check the length of the array before you try to convert the bytes to a double. If there aren't bytes enough for a double, you have reached the end of the stream.

ediazc wrote:
BinaryReader is bad designed.

I don't think so. Perhaps it's not designed the way you are used to, or maybe not designed the way you try to use it. I believe it's rather well designed for it's purpose, though.

---
b { font-weight: normal; }

AnswerRe: Why BinaryReader don't have the EOF property Pin
S. Senthil Kumar5-Oct-05 19:42
S. Senthil Kumar5-Oct-05 19:42 
GeneralRe: Why BinaryReader don't have the EOF property Pin
Guffa5-Oct-05 19:50
Guffa5-Oct-05 19:50 
GeneralRe: Why BinaryReader don't have the EOF property Pin
S. Senthil Kumar5-Oct-05 20:38
S. Senthil Kumar5-Oct-05 20:38 
GeneralRe: Why BinaryReader don't have the EOF property Pin
ediazc6-Oct-05 5:04
ediazc6-Oct-05 5:04 
GeneralRe: Why BinaryReader don't have the EOF property Pin
ediazc6-Oct-05 5:01
ediazc6-Oct-05 5:01 
GeneralRe: Why BinaryReader don't have the EOF property Pin
Moshe B16-Apr-10 5:18
Moshe B16-Apr-10 5:18 
QuestionWebClient and HTTPWebRequest dealing with redireciton? Pin
Red_Wizard_Shot_The_Food5-Oct-05 15:00
Red_Wizard_Shot_The_Food5-Oct-05 15:00 
AnswerRe: WebClient and HTTPWebRequest dealing with redireciton? Pin
Red_Wizard_Shot_The_Food5-Oct-05 16:05
Red_Wizard_Shot_The_Food5-Oct-05 16:05 
Questionnewbee ques on structs Pin
ter815-Oct-05 14:12
susster815-Oct-05 14:12 
AnswerRe: newbee ques on structs Pin
enjoycrack5-Oct-05 14:19
enjoycrack5-Oct-05 14:19 
GeneralRe: newbee ques on structs Pin
ter815-Oct-05 14:24
susster815-Oct-05 14:24 
GeneralRe: newbee ques on structs Pin
enjoycrack6-Oct-05 10:31
enjoycrack6-Oct-05 10:31 
AnswerRe: newbee ques on structs Pin
Christian Graus5-Oct-05 14:57
protectorChristian Graus5-Oct-05 14:57 
QuestionCurrency Symbol Pin
Dominic Farr5-Oct-05 13:00
Dominic Farr5-Oct-05 13:00 
QuestionGetting my program to look up UK addresses from postcodes... How? Pin
Red_Wizard_Shot_The_Food5-Oct-05 12:15
Red_Wizard_Shot_The_Food5-Oct-05 12:15 
QuestionPainting in a Panel Pin
Red Tricycle5-Oct-05 11:18
Red Tricycle5-Oct-05 11:18 
AnswerRe: Painting in a Panel Pin
Heath Stewart5-Oct-05 11:46
protectorHeath Stewart5-Oct-05 11:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.