Click here to Skip to main content
15,891,670 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reg: Crystal Report Pin
Eddy Vluggen5-May-10 0:56
professionalEddy Vluggen5-May-10 0:56 
GeneralRe: Reg: Crystal Report Pin
Dotnetkanna5-May-10 2:56
Dotnetkanna5-May-10 2:56 
GeneralRe: Reg: Crystal Report Pin
Eddy Vluggen5-May-10 5:00
professionalEddy Vluggen5-May-10 5:00 
QuestionINotifyPropertyChanged Question. Pin
Siddhartha S.4-May-10 19:04
Siddhartha S.4-May-10 19:04 
AnswerRe: INotifyPropertyChanged Question. Pin
Dan Mos4-May-10 19:19
Dan Mos4-May-10 19:19 
AnswerRe: INotifyPropertyChanged Question. Pin
AspDotNetDev4-May-10 19:57
protectorAspDotNetDev4-May-10 19:57 
QuestionUsing List for combo box collection [modified] Pin
mprice2144-May-10 17:53
mprice2144-May-10 17:53 
AnswerRe: Using List for combo box collection Pin
Luc Pattyn4-May-10 18:19
sitebuilderLuc Pattyn4-May-10 18:19 
Hi,

your message isn't clear at all. The code shown is unrelated to the combobox you mention in the subject line.
and you provide no symptoms: what should it do? what does it? how is that different?

a few suggestions:
1. don't leave code in comments, in confuses all readers, including yourself.
2. don't do serialPort1.WriteLine("!001:SERL?\r"); i.e. don't mix an explicit "\r" with some implicit newline character; if you need to make sure, either set the correct value to serialPort1.NewLine or make everything explicit, e.g. serialPort1.Write("!001:SERL?\r\n");
3. what is the peripheral sending? if it includes "\r\n", what is going to happen to the "\n"? Won't it confuse the next read?
4. you should not use double.Parse as it may throw an exception on bad input; never trust an external device to always offer correct data!
5. you should provide an overall try-catch, and log the Exception.ToString() you may get. At least till you get something to work, then maybe revisit proper error handling.
6. I think you should open and close serial ports within your loop, first open, then close. Not what you did!
7. A serial open may fail (e.g. when your system has an old dial-up modem built in, you probably won't be able to open it; when it throws an exception, your foreach loop would terminate immediately!

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.


GeneralRe: Using List for combo box collection Pin
mprice2144-May-10 18:40
mprice2144-May-10 18:40 
GeneralRe: Using List for combo box collection Pin
Dan Mos4-May-10 18:56
Dan Mos4-May-10 18:56 
QuestionCalibration and Tolerance Pin
jokerleo4-May-10 17:32
jokerleo4-May-10 17:32 
AnswerRe: Calibration and Tolerance Pin
Luc Pattyn4-May-10 18:21
sitebuilderLuc Pattyn4-May-10 18:21 
GeneralRe: Calibration and Tolerance Pin
jokerleo4-May-10 20:11
jokerleo4-May-10 20:11 
GeneralRe: Calibration and Tolerance Pin
Luc Pattyn5-May-10 2:44
sitebuilderLuc Pattyn5-May-10 2:44 
GeneralRe: Calibration and Tolerance Pin
Dave Kreskowiak5-May-10 4:22
mveDave Kreskowiak5-May-10 4:22 
QuestionReading standardoutput to a file Pin
svanwass4-May-10 14:06
svanwass4-May-10 14:06 
AnswerRe: Reading standardoutput to a file Pin
Dan Mos4-May-10 14:54
Dan Mos4-May-10 14:54 
GeneralRe: Reading standardoutput to a file Pin
svanwass4-May-10 15:00
svanwass4-May-10 15:00 
GeneralRe: Reading standardoutput to a file Pin
Dan Mos4-May-10 16:21
Dan Mos4-May-10 16:21 
GeneralRe: Reading standardoutput to a file Pin
Luc Pattyn4-May-10 16:37
sitebuilderLuc Pattyn4-May-10 16:37 
GeneralRe: Reading standardoutput to a file Pin
Dan Mos4-May-10 16:51
Dan Mos4-May-10 16:51 
GeneralRe: Reading standardoutput to a file Pin
Luc Pattyn4-May-10 17:00
sitebuilderLuc Pattyn4-May-10 17:00 
GeneralRe: Reading standardoutput to a file Pin
Dan Mos4-May-10 17:06
Dan Mos4-May-10 17:06 
GeneralRe: Reading standardoutput to a file Pin
Luc Pattyn4-May-10 17:09
sitebuilderLuc Pattyn4-May-10 17:09 
GeneralRe: Reading standardoutput to a file Pin
Dan Mos4-May-10 17:14
Dan Mos4-May-10 17:14 

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.