Click here to Skip to main content
15,905,238 members
Home / Discussions / C#
   

C#

 
AnswerRe: The configuration section cannot contain a CDATA or text element. Pin
Eddy Vluggen9-Aug-12 1:26
professionalEddy Vluggen9-Aug-12 1:26 
AnswerRe: The configuration section cannot contain a CDATA or text element. Pin
Peter_in_27809-Aug-12 1:29
professionalPeter_in_27809-Aug-12 1:29 
QuestionA question about closing socket Pin
tiwal8-Aug-12 23:55
tiwal8-Aug-12 23:55 
AnswerRe: A question about closing socket Pin
Philip Stuyck9-Aug-12 11:24
Philip Stuyck9-Aug-12 11:24 
GeneralRe: A question about closing socket Pin
tiwal9-Aug-12 22:56
tiwal9-Aug-12 22:56 
QuestionHow to write Events in Asp .Net Pin
Member 84809808-Aug-12 22:37
Member 84809808-Aug-12 22:37 
AnswerRe: How to write Events in Asp .Net Pin
Ed Hill _5_8-Aug-12 23:09
Ed Hill _5_8-Aug-12 23:09 
AnswerMessage Closed Pin
8-Aug-12 23:32
Alagiri.periyasamy@merrillcorp.com8-Aug-12 23:32 
SuggestionRe: How to write Events in Asp .Net Pin
Shameel8-Aug-12 23:54
professionalShameel8-Aug-12 23:54 
AnswerRe: How to write Events in Asp .Net Pin
BobJanova9-Aug-12 2:13
BobJanova9-Aug-12 2:13 
GeneralRe: How to write Events in Asp .Net Pin
Member 84809809-Aug-12 18:42
Member 84809809-Aug-12 18:42 
Generalres://ieframe.dll/navcancl.htm#http://localhost:2441/ErrorPage.aspx?ErrorId= Pin
Alagiri.periyasamy@merrillcorp.com8-Aug-12 21:13
Alagiri.periyasamy@merrillcorp.com8-Aug-12 21:13 
GeneralRe: res://ieframe.dll/navcancl.htm#http://localhost:2441/ErrorPage.aspx?ErrorId= Pin
Pete O'Hanlon8-Aug-12 23:09
mvePete O'Hanlon8-Aug-12 23:09 
GeneralRe: res://ieframe.dll/navcancl.htm#http://localhost:2441/ErrorPage.aspx?ErrorId= Pin
Alagiri.periyasamy@merrillcorp.com8-Aug-12 23:23
Alagiri.periyasamy@merrillcorp.com8-Aug-12 23:23 
GeneralRe: res://ieframe.dll/navcancl.htm#http://localhost:2441/ErrorPage.aspx?ErrorId= Pin
Pete O'Hanlon8-Aug-12 23:31
mvePete O'Hanlon8-Aug-12 23:31 
GeneralConvert Word Doc to Byte Pin
ASPnoob8-Aug-12 19:46
ASPnoob8-Aug-12 19:46 
GeneralRe: Convert Word Doc to Byte Pin
Pete O'Hanlon8-Aug-12 20:16
mvePete O'Hanlon8-Aug-12 20:16 
GeneralRe: Convert Word Doc to Byte Pin
ASPnoob8-Aug-12 21:18
ASPnoob8-Aug-12 21:18 
GeneralRe: Convert Word Doc to Byte Pin
Pete O'Hanlon8-Aug-12 22:40
mvePete O'Hanlon8-Aug-12 22:40 
GeneralRe: Convert Word Doc to Byte Pin
ASPnoob9-Aug-12 0:45
ASPnoob9-Aug-12 0:45 
GeneralRe: Convert Word Doc to Byte Pin
Pete O'Hanlon9-Aug-12 0:52
mvePete O'Hanlon9-Aug-12 0:52 
GeneralRe: Convert Word Doc to Byte Pin
lmoelleb9-Aug-12 5:27
lmoelleb9-Aug-12 5:27 
It is a common misunderstanding that the Stream.Read method will read the number of bytes you specify in the count argument. But the count parameter specify the maximum number of bytes the stream is allowed to read. An implementation of a stream is free to return fewer bytes, even if it has not reached the end of the stream. It must return at least one byte unless the end of stream has been reached.

The MemoryStream implementation happens to read all at once - and it is probably unlikely to change any time soon but I would not recommend to get used to this behavior - because then you start using it with other stream types you will get errors.

The easy solution here is to use MemoryStream.ToArray(). In other cases where you need to read a fixed number of bytes from a stream you will either have to make a loop calling Read again if it did not return all bytes or you can for example create a BinaryReader for the stream.
GeneralRe: Convert Word Doc to Byte Pin
Pete O'Hanlon9-Aug-12 5:36
mvePete O'Hanlon9-Aug-12 5:36 
Questionimage recognition through google image search Pin
Mohsin Mushtaq8-Aug-12 4:03
Mohsin Mushtaq8-Aug-12 4:03 
AnswerRe: image recognition through google image search Pin
Shameel8-Aug-12 4:19
professionalShameel8-Aug-12 4:19 

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.