Click here to Skip to main content
15,906,558 members
Home / Discussions / C#
   

C#

 
AnswerRe: Generic sum Pin
Russell Jones18-Jan-07 22:38
Russell Jones18-Jan-07 22:38 
GeneralRe: Generic sum Pin
V. Thieme18-Jan-07 23:37
V. Thieme18-Jan-07 23:37 
AnswerRe: Generic sum Pin
Christian Graus18-Jan-07 22:57
protectorChristian Graus18-Jan-07 22:57 
GeneralRe: Generic sum Pin
V. Thieme18-Jan-07 23:36
V. Thieme18-Jan-07 23:36 
QuestionLoading an image as a byte array Pin
Russell Jones18-Jan-07 22:11
Russell Jones18-Jan-07 22:11 
AnswerRe: Loading an image as a byte array Pin
Christian Graus18-Jan-07 22:56
protectorChristian Graus18-Jan-07 22:56 
GeneralRe: Loading an image as a byte array Pin
Russell Jones18-Jan-07 23:01
Russell Jones18-Jan-07 23:01 
AnswerRe: Loading an image as a byte array Pin
Guffa18-Jan-07 22:56
Guffa18-Jan-07 22:56 
The Read method returns an integer that contains the number of bytes read. You should check this value to be sure that all the data was read.

From the documentation on the Read method in MSDN:
"The Read method returns zero only after reaching the end of the stream. Otherwise, Read always reads at least one byte from the stream before returning. If no data is available from the stream upon a call to Read, the method will block until at least one byte of data can be returned. An implementation is free to return fewer bytes than requested even if the end of the stream has not been reached."

If you are using framework 2, you can use the File.ReadAllBytes method.

---
Year happy = new Year(2007);

AnswerRe: Loading an image as a byte array Pin
Luc Pattyn18-Jan-07 23:03
sitebuilderLuc Pattyn18-Jan-07 23:03 
GeneralRe: Loading an image as a byte array Pin
Russell Jones18-Jan-07 23:02
Russell Jones18-Jan-07 23:02 
GeneralRe: Loading an image as a byte array Pin
Luc Pattyn18-Jan-07 23:10
sitebuilderLuc Pattyn18-Jan-07 23:10 
GeneralRe: Loading an image as a byte array Pin
Russell Jones18-Jan-07 23:39
Russell Jones18-Jan-07 23:39 
GeneralRe: Loading an image as a byte array Pin
Luc Pattyn18-Jan-07 23:46
sitebuilderLuc Pattyn18-Jan-07 23:46 
Generalbug in doc Pin
Luc Pattyn18-Jan-07 23:58
sitebuilderLuc Pattyn18-Jan-07 23:58 
GeneralRe: bug in doc Pin
Russell Jones19-Jan-07 0:32
Russell Jones19-Jan-07 0:32 
QuestionData Transfer to new table Pin
Bulky Fellow18-Jan-07 22:06
Bulky Fellow18-Jan-07 22:06 
AnswerRe: Data Transfer to new table Pin
mihksoft18-Jan-07 22:49
mihksoft18-Jan-07 22:49 
AnswerRe: Data Transfer to new table Pin
Russell Jones18-Jan-07 22:54
Russell Jones18-Jan-07 22:54 
GeneralRe: Data Transfer to new table Pin
Bulky Fellow24-Jan-07 21:35
Bulky Fellow24-Jan-07 21:35 
QuestionBest way of stopping program after caught in catch{} Pin
livez18-Jan-07 21:49
livez18-Jan-07 21:49 
AnswerRe: Best way of stopping program after caught in catch{} Pin
Stefan Troschuetz18-Jan-07 21:57
Stefan Troschuetz18-Jan-07 21:57 
AnswerRe: Best way of stopping program after caught in catch{} Pin
quiteSmart18-Jan-07 21:58
quiteSmart18-Jan-07 21:58 
GeneralRe: Best way of stopping program after caught in catch{} Pin
livez18-Jan-07 22:24
livez18-Jan-07 22:24 
GeneralRe: Best way of stopping program after caught in catch{} Pin
quiteSmart18-Jan-07 22:36
quiteSmart18-Jan-07 22:36 
AnswerRe: Best way of stopping program after caught in catch{} Pin
Russell Jones18-Jan-07 22:33
Russell Jones18-Jan-07 22:33 

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.