Click here to Skip to main content
15,890,123 members
Home / Discussions / C#
   

C#

 
AnswerRe: Passing different variable types Pin
Luc Pattyn13-Apr-10 5:54
sitebuilderLuc Pattyn13-Apr-10 5:54 
GeneralRe: Passing different variable types Pin
dan!sh 13-Apr-10 6:12
professional dan!sh 13-Apr-10 6:12 
GeneralRe: Passing different variable types Pin
Luc Pattyn13-Apr-10 6:28
sitebuilderLuc Pattyn13-Apr-10 6:28 
GeneralRe: Passing different variable types Pin
dan!sh 13-Apr-10 6:46
professional dan!sh 13-Apr-10 6:46 
GeneralRe: Passing different variable types Pin
Luc Pattyn13-Apr-10 6:47
sitebuilderLuc Pattyn13-Apr-10 6:47 
GeneralRe: Passing different variable types Pin
DaveyM6913-Apr-10 8:25
professionalDaveyM6913-Apr-10 8:25 
GeneralRe: Passing different variable types Pin
mprice21413-Apr-10 6:30
mprice21413-Apr-10 6:30 
GeneralRe: Passing different variable types Pin
Luc Pattyn13-Apr-10 6:46
sitebuilderLuc Pattyn13-Apr-10 6:46 
mprice214 wrote:
The device only requires a cr


so use serialPort1.Write("*X01\r"); instead of WriteLine() and you're in charge, now it doesn't matter what SerialPort.NewLine contains any more.


mprice214 wrote:
get things working first


sure, so am I. By seeing exceptions right away. As a minimum, add Console.WriteLine(exception.ToString());. Either you don't have exceptions, then it makes no difference; or you have, and now you can see them.


mprice214 wrote:
it works


Yes, I forgot: Invoke without parameters provides some defaults, and since you don't really use the parameters inside DisplayText, there is no problem. However, I wouldn't do it like that.

mprice214 wrote:
Regarding the initial question


OK, if you are not really interested in the string, why not use a class member "double Rx;" instead of "string RxString;". Have DataReceived read the string, convert it to double, and store the value in Rx; then have DisplayText and any other interested method just read the Rx variable.

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: Passing different variable types Pin
mprice21413-Apr-10 7:56
mprice21413-Apr-10 7:56 
GeneralRe: Passing different variable types Pin
Luc Pattyn13-Apr-10 8:02
sitebuilderLuc Pattyn13-Apr-10 8:02 
AnswerRe: Passing different variable types Pin
kevinnicol13-Apr-10 6:19
kevinnicol13-Apr-10 6:19 
GeneralRe: Passing different variable types Pin
mprice21413-Apr-10 6:32
mprice21413-Apr-10 6:32 
QuestionHow to Save the Excel file with some file format [modified] [Solved] Pin
yu-jian13-Apr-10 4:37
yu-jian13-Apr-10 4:37 
AnswerRe: How to Save the Excel file with some file format Pin
Dan Mos13-Apr-10 5:13
Dan Mos13-Apr-10 5:13 
Questiondatagrid checkbox Pin
Morgs Morgan13-Apr-10 4:26
Morgs Morgan13-Apr-10 4:26 
AnswerRe: datagrid checkbox Pin
J imran13-Apr-10 8:16
J imran13-Apr-10 8:16 
GeneralRe: datagrid checkbox Pin
Morgs Morgan13-Apr-10 9:33
Morgs Morgan13-Apr-10 9:33 
Questionsmart device Forms-Database Pin
Tunisien8613-Apr-10 2:18
Tunisien8613-Apr-10 2:18 
AnswerRe: smart device Forms-Database Pin
Luc Pattyn13-Apr-10 2:55
sitebuilderLuc Pattyn13-Apr-10 2:55 
AnswerRe: smart device Forms-Database [modified] Pin
Tim Yen13-Apr-10 2:55
Tim Yen13-Apr-10 2:55 
GeneralRe: smart device Forms-Database Pin
Luc Pattyn13-Apr-10 3:11
sitebuilderLuc Pattyn13-Apr-10 3:11 
GeneralRe: smart device Forms-Database Pin
Tunisien8613-Apr-10 4:17
Tunisien8613-Apr-10 4:17 
AnswerRe: smart device Forms-Database [modified] Pin
O.Phil13-Apr-10 4:11
O.Phil13-Apr-10 4:11 
GeneralRe: smart device Forms-Database Pin
Luc Pattyn13-Apr-10 4:20
sitebuilderLuc Pattyn13-Apr-10 4:20 
GeneralRe: smart device Forms-Database Pin
O.Phil13-Apr-10 4:26
O.Phil13-Apr-10 4:26 

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.