Click here to Skip to main content
15,912,072 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to run an application action on clicking link Pin
Abhinav S2-Nov-11 17:59
Abhinav S2-Nov-11 17:59 
AnswerRe: How to run an application action on clicking link Pin
Mycroft Holmes2-Nov-11 20:24
professionalMycroft Holmes2-Nov-11 20:24 
Questionerror in adding the reference of my web service in C#.net Pin
yousefshokati1-Nov-11 23:32
yousefshokati1-Nov-11 23:32 
AnswerRe: error in adding the reference of my web service in C#.net REPOST Pin
Richard MacCutchan2-Nov-11 0:11
mveRichard MacCutchan2-Nov-11 0:11 
QuestionPlease help with writing to a serial port Pin
turbosupramk31-Nov-11 20:12
turbosupramk31-Nov-11 20:12 
AnswerRe: Please help with writing to a serial port Pin
BobJanova1-Nov-11 23:51
BobJanova1-Nov-11 23:51 
GeneralRe: Please help with writing to a serial port Pin
turbosupramk32-Nov-11 2:10
turbosupramk32-Nov-11 2:10 
AnswerRe: Please help with writing to a serial port Pin
Luc Pattyn2-Nov-11 3:25
sitebuilderLuc Pattyn2-Nov-11 3:25 
In .NET strings and char contain 16-bit Unicode characters. So your serialPort1.Write(buff, 0, 1) is writing one character, i.e. two bytes; for ASCII characters that effectively means there is a NULL character preceeding every character you really want.

And yes, the MSDN documentation states that ASCII encoding is the default for SerialPort, but something isn't quite right about that. Either set the Encoding property explicitly, or (what I normally do) construct a byte array yourself and send that using the other Write overload.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: Please help with writing to a serial port Pin
turbosupramk32-Nov-11 3:55
turbosupramk32-Nov-11 3:55 
AnswerRe: Please help with writing to a serial port Pin
Luc Pattyn2-Nov-11 4:22
sitebuilderLuc Pattyn2-Nov-11 4:22 
GeneralRe: Please help with writing to a serial port Pin
turbosupramk32-Nov-11 5:48
turbosupramk32-Nov-11 5:48 
AnswerRe: Please help with writing to a serial port Pin
Luc Pattyn2-Nov-11 6:52
sitebuilderLuc Pattyn2-Nov-11 6:52 
GeneralRe: Please help with writing to a serial port Pin
turbosupramk32-Nov-11 9:00
turbosupramk32-Nov-11 9:00 
AnswerRe: Please help with writing to a serial port Pin
Luc Pattyn2-Nov-11 9:11
sitebuilderLuc Pattyn2-Nov-11 9:11 
GeneralRe: Please help with writing to a serial port Pin
turbosupramk32-Nov-11 9:54
turbosupramk32-Nov-11 9:54 
AnswerRe: Please help with writing to a serial port Pin
Luc Pattyn2-Nov-11 10:10
sitebuilderLuc Pattyn2-Nov-11 10:10 
GeneralRe: Please help with writing to a serial port Pin
turbosupramk32-Nov-11 11:03
turbosupramk32-Nov-11 11:03 
AnswerRe: Please help with writing to a serial port Pin
Luc Pattyn2-Nov-11 11:20
sitebuilderLuc Pattyn2-Nov-11 11:20 
GeneralRe: Please help with writing to a serial port Pin
turbosupramk32-Nov-11 11:37
turbosupramk32-Nov-11 11:37 
GeneralRe: Please help with writing to a serial port Pin
Rob Philpott2-Nov-11 7:34
Rob Philpott2-Nov-11 7:34 
AnswerRe: Please help with writing to a serial port Pin
PIEBALDconsult2-Nov-11 9:00
mvePIEBALDconsult2-Nov-11 9:00 
GeneralRe: Please help with writing to a serial port Pin
turbosupramk32-Nov-11 9:10
turbosupramk32-Nov-11 9:10 
AnswerRe: Please help with writing to a serial port Pin
Alan N2-Nov-11 10:12
Alan N2-Nov-11 10:12 
GeneralRe: Please help with writing to a serial port Pin
turbosupramk32-Nov-11 11:40
turbosupramk32-Nov-11 11:40 
Questionerror handling Pin
dcof1-Nov-11 17:46
dcof1-Nov-11 17: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.