Click here to Skip to main content
15,881,248 members
Home / Discussions / C#
   

C#

 
AnswerRe: Optional Argument Pin
Abhinav S22-Oct-10 22:53
Abhinav S22-Oct-10 22:53 
AnswerShameless Plug Pin
Keith Barrow23-Oct-10 3:05
professionalKeith Barrow23-Oct-10 3:05 
GeneralRe: Shameless Plug Pin
Anubhava Dimri24-Oct-10 18:09
Anubhava Dimri24-Oct-10 18:09 
QuestionChars received Pin
Tichaona J22-Oct-10 10:26
Tichaona J22-Oct-10 10:26 
AnswerRe: Chars received Pin
dbrenth22-Oct-10 10:49
dbrenth22-Oct-10 10:49 
GeneralRe: Chars received Pin
Tichaona J22-Oct-10 11:11
Tichaona J22-Oct-10 11:11 
AnswerRe: Chars received [modified] Pin
Pete O'Hanlon22-Oct-10 11:54
mvePete O'Hanlon22-Oct-10 11:54 
AnswerRe: Chars received [modified] Pin
Luc Pattyn22-Oct-10 15:23
sitebuilderLuc Pattyn22-Oct-10 15:23 
Several things could be wrong here, however I can't tell which one(s) it will be as you have shown only a fraction of the relevant code. Here are the main possibilities:

1.
you may be invoking a receive with a small buffer; if you were to ask for one byte, then you would only get one byte.

2.
you might have an encoding mismatch between sender and receiver. e.g. if the sender uses Unicode, regular characters would look like real (ANSI) bytes and NULLs intertwined; an 8-bit encoder would react badly on the NULLs.

3.
what EndReceive returns is the number of bytes, not characters, hence char[] chars = new char[iRx]; is wrong. IMO you should use [EDIT] Encoding.GetString() right away to convert bytes into a string.[/EDIT]


Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


modified on Friday, October 22, 2010 10:04 PM

QuestionParsing csv file with commas and quotes as deliminators Pin
roman_s22-Oct-10 9:00
roman_s22-Oct-10 9:00 
AnswerRe: Parsing csv file with commas and quotes as deliminators Pin
fjdiewornncalwe22-Oct-10 10:35
professionalfjdiewornncalwe22-Oct-10 10:35 
AnswerRe: Parsing csv file with commas and quotes as deliminators [Modified] Pin
OriginalGriff22-Oct-10 10:40
mveOriginalGriff22-Oct-10 10:40 
AnswerRe: Parsing csv file with commas and quotes as deliminators Pin
Luc Pattyn22-Oct-10 15:25
sitebuilderLuc Pattyn22-Oct-10 15:25 
GeneralRe: Parsing csv file with commas and quotes as deliminators Pin
PIEBALDconsult22-Oct-10 16:42
mvePIEBALDconsult22-Oct-10 16:42 
GeneralRe: Parsing csv file with commas and quotes as deliminators Pin
Luc Pattyn22-Oct-10 16:43
sitebuilderLuc Pattyn22-Oct-10 16:43 
AnswerRe: Parsing csv file with commas and quotes as deliminators Pin
Brady Kelly22-Oct-10 19:23
Brady Kelly22-Oct-10 19:23 
GeneralRe: Parsing csv file with commas and quotes as deliminators Pin
OriginalGriff22-Oct-10 22:21
mveOriginalGriff22-Oct-10 22:21 
GeneralRe: Parsing csv file with commas and quotes as deliminators Pin
PIEBALDconsult15-Dec-10 7:40
mvePIEBALDconsult15-Dec-10 7:40 
GeneralRe: Parsing csv file with commas and quotes as deliminators Pin
Brady Kelly15-Dec-10 19:39
Brady Kelly15-Dec-10 19:39 
AnswerRe: Parsing csv file with commas and quotes as deliminators Pin
OriginalGriff22-Oct-10 23:39
mveOriginalGriff22-Oct-10 23:39 
GeneralRe: Parsing csv file with commas and quotes as deliminators Pin
Luc Pattyn23-Oct-10 2:45
sitebuilderLuc Pattyn23-Oct-10 2:45 
GeneralRe: Parsing csv file with commas and quotes as deliminators Pin
OriginalGriff23-Oct-10 3:43
mveOriginalGriff23-Oct-10 3:43 
QuestionClose Pop Up windows Pin
SatyaKeerthi1522-Oct-10 3:11
SatyaKeerthi1522-Oct-10 3:11 
AnswerRe: Close Pop Up windows Pin
Not Active22-Oct-10 3:22
mentorNot Active22-Oct-10 3:22 
QuestionAnnoying ListBox problem [SOLVED] Pin
Henry Minute22-Oct-10 3:10
Henry Minute22-Oct-10 3:10 
AnswerRe: Annoying ListBox problem Pin
Luc Pattyn22-Oct-10 4:35
sitebuilderLuc Pattyn22-Oct-10 4:35 

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.