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

C#

 
AnswerRe: Accessing webcam.. Pin
Christian Graus20-Apr-09 17:36
protectorChristian Graus20-Apr-09 17:36 
GeneralRe: Accessing webcam.. Pin
Jacob Dixon20-Apr-09 18:16
Jacob Dixon20-Apr-09 18:16 
AnswerRe: Accessing webcam.. Pin
Amar Chaudhary20-Apr-09 19:23
Amar Chaudhary20-Apr-09 19:23 
AnswerRe: Accessing webcam.. Pin
Skymir21-Apr-09 3:04
Skymir21-Apr-09 3:04 
Questionreading contents of multiple text files Pin
mist_psycho20-Apr-09 15:50
mist_psycho20-Apr-09 15:50 
AnswerRe: reading contents of multiple text files Pin
N a v a n e e t h20-Apr-09 16:31
N a v a n e e t h20-Apr-09 16:31 
QuestionBinaryReader stuck on reading from NetworkStream Pin
Ady Shimony20-Apr-09 15:41
Ady Shimony20-Apr-09 15:41 
AnswerRe: BinaryReader stuck on reading from NetworkStream Pin
N a v a n e e t h20-Apr-09 16:45
N a v a n e e t h20-Apr-09 16:45 
AFAIK, ReadString() throws EndOfStreamException when there is no data in stream. Hanging looks odd and problem will be somewhere else. Anyway it is always good to check data exist before you read from stream. Just do a check before you read the string. Something like,
bool canRead = (binaryReader.Read() == -1) ? false : true;
if(canRead){

    // Start from the first position
    binaryReader.BaseStream.Seek(0, SeekOrigin.Begin);

    return binaryReader.ReadString();
}
Hope that helps Smile | :)


GeneralRe: BinaryReader stuck on reading from NetworkStream Pin
Ady Shimony21-Apr-09 1:49
Ady Shimony21-Apr-09 1:49 
AnswerRe: BinaryReader stuck on reading from NetworkStream Pin
Rob Philpott20-Apr-09 22:35
Rob Philpott20-Apr-09 22:35 
GeneralRe: BinaryReader stuck on reading from NetworkStream Pin
Ady Shimony21-Apr-09 1:56
Ady Shimony21-Apr-09 1:56 
GeneralRe: BinaryReader stuck on reading from NetworkStream Pin
Rob Philpott21-Apr-09 2:48
Rob Philpott21-Apr-09 2:48 
GeneralRe: BinaryReader stuck on reading from NetworkStream Pin
Ady Shimony22-Apr-09 2:45
Ady Shimony22-Apr-09 2:45 
QuestionHow to free shared resources ? Pin
Moshe T20-Apr-09 14:01
Moshe T20-Apr-09 14:01 
AnswerRe: How to free shared resources ? Pin
Mycroft Holmes20-Apr-09 14:19
professionalMycroft Holmes20-Apr-09 14:19 
AnswerRe: How to free shared resources ? Pin
N a v a n e e t h20-Apr-09 16:53
N a v a n e e t h20-Apr-09 16:53 
QuestionGraphicsPath with Linecaps Pin
dh_20-Apr-09 11:49
dh_20-Apr-09 11:49 
AnswerRe: GraphicsPath with Linecaps Pin
Luc Pattyn20-Apr-09 13:50
sitebuilderLuc Pattyn20-Apr-09 13:50 
AnswerRe: GraphicsPath with Linecaps Pin
Henry Minute21-Apr-09 1:09
Henry Minute21-Apr-09 1:09 
GeneralRe: GraphicsPath with Linecaps Pin
dh_23-Apr-09 2:06
dh_23-Apr-09 2:06 
QuestionC# Web project Crystal Reports Pin
newbie1234567891020-Apr-09 9:53
newbie1234567891020-Apr-09 9:53 
AnswerRe: C# Web project Crystal Reports Pin
Rolando CC20-Apr-09 11:20
professionalRolando CC20-Apr-09 11:20 
GeneralRe: C# Web project Crystal Reports Pin
newbie1234567891021-Apr-09 2:54
newbie1234567891021-Apr-09 2:54 
GeneralRe: C# Web project Crystal Reports Pin
Rolando CC21-Apr-09 4:30
professionalRolando CC21-Apr-09 4:30 
GeneralRe: C# Web project Crystal Reports Pin
newbie1234567891021-Apr-09 4:44
newbie1234567891021-Apr-09 4:44 

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.