Click here to Skip to main content
15,903,856 members
Home / Discussions / C#
   

C#

 
QuestionNPlot - how do I not show weekend dates Pin
boreland13-Apr-10 7:36
boreland13-Apr-10 7:36 
QuestionBackground Worker with Multiple Progress Bars Pin
eddieangel13-Apr-10 7:07
eddieangel13-Apr-10 7:07 
AnswerRe: Background Worker with Multiple Progress Bars Pin
Luc Pattyn13-Apr-10 7:23
sitebuilderLuc Pattyn13-Apr-10 7:23 
GeneralRe: Background Worker with Multiple Progress Bars Pin
eddieangel13-Apr-10 8:47
eddieangel13-Apr-10 8:47 
GeneralRe: Background Worker with Multiple Progress Bars Pin
Luc Pattyn13-Apr-10 9:55
sitebuilderLuc Pattyn13-Apr-10 9:55 
GeneralRe: Background Worker with Multiple Progress Bars Pin
eddieangel13-Apr-10 13:46
eddieangel13-Apr-10 13:46 
QuestionPassing different variable types Pin
mprice21413-Apr-10 4:51
mprice21413-Apr-10 4:51 
AnswerRe: Passing different variable types Pin
Luc Pattyn13-Apr-10 5:54
sitebuilderLuc Pattyn13-Apr-10 5:54 
Not sure I understand your question very well, however here are some remarks:

1.

mprice214 wrote:
RxString.Remove(0, 3); //This removes the first 4 characters


Not true. At best it removes 3 characters; and if there are fewer, expect an exception.

2.

mprice214 wrote:
double.Parse (RxString);


that will fail if the data isn't really a string representation of a double. Don't do this on external data, it will bite you. Either add try-catch or better yet use TryParse().

3.
why does DisplayText() have parameters which make it look like a real event handler, you are not using those parameters, instead you are using some class member. It would seem logical to give it one parameter: the text it should display.

4.

mprice214 wrote:
serialPort1.WriteLine("*X01\r");


very strange. You want a carriage return plus whatever the system uses for a newline (maybe "\r\n"). Either you like what the system gives you, or you don't; I would never mix the two.

5.

mprice214 wrote:
catch (Exception Exception)
{
return;
}


This is not acceptable; whatever goes wrong, you ignore it. So when it goes wrong, you will have an impossible job to diagnose and fix the problem. And believe me, serial communication always goes wrong sooner or later. You should NOT swallow exceptions, either catch a very specific one and add a comment as to why you really don't care about it, or log it somewhere so it leaves a trail.

6.

mprice214 wrote:
this.Invoke(new EventHandler(DisplayText));


That does not work, as the parameter list does not match. First make sure which parameters the method should have, then make sure to provide them, using an overload of Invoke().

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
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 
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 

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.