Click here to Skip to main content
15,918,967 members
Home / Discussions / C#
   

C#

 
QuestionHow do I call a method on the parent form from another form? Pin
Paul Stol18-Mar-10 10:09
Paul Stol18-Mar-10 10:09 
AnswerRe: How do I call a method on the parent form from another form? Pin
T M Gray18-Mar-10 10:46
T M Gray18-Mar-10 10:46 
AnswerRe: How do I call a method on the parent form from another form? Pin
DaveyM6918-Mar-10 11:15
professionalDaveyM6918-Mar-10 11:15 
QuestionQuestion with converting double to long Pin
Fenryl18-Mar-10 9:19
Fenryl18-Mar-10 9:19 
AnswerRe: Question with converting double to long Pin
Alaric_18-Mar-10 9:35
professionalAlaric_18-Mar-10 9:35 
GeneralRe: Question with converting double to long Pin
#realJSOP18-Mar-10 9:44
professional#realJSOP18-Mar-10 9:44 
AnswerRe: Question with converting double to long Pin
#realJSOP18-Mar-10 9:46
professional#realJSOP18-Mar-10 9:46 
AnswerRe: Question with converting double to long Pin
Luc Pattyn18-Mar-10 9:55
sitebuilderLuc Pattyn18-Mar-10 9:55 
That doesn't make much sense to me. I'll have to guess what you intent. You not showing the declarations does not help.

If all of those variables are doubles, then compare doubles, unless your conditional block is really going to do something with (long)value. If so, it deserves to be represented by a local value and an all-long comparison is in order, that would yield:
long minValue = 56;
long maxValue = 70;

double value = 55.99.
...
long longValue=(long)value;
if (longValue >= minValue && longValue <= maxValue) {
    do_something_with(longValue);
}


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

I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.

GeneralRe: Question with converting double to long Pin
Richard MacCutchan18-Mar-10 10:34
mveRichard MacCutchan18-Mar-10 10:34 
GeneralRe: Question with converting double to long Pin
Alaric_18-Mar-10 10:35
professionalAlaric_18-Mar-10 10:35 
GeneralRe: Question with converting double to long Pin
Luc Pattyn18-Mar-10 11:06
sitebuilderLuc Pattyn18-Mar-10 11:06 
AnswerRe: Question with converting double to long Pin
AspDotNetDev18-Mar-10 10:53
protectorAspDotNetDev18-Mar-10 10:53 
AnswerRe: Question with converting double to long Pin
PIEBALDconsult18-Mar-10 16:22
mvePIEBALDconsult18-Mar-10 16:22 
Question(2.0) ...wanting to show/hide control within a GridView's TableCell.Controls collection. [modified] Pin
Alaric_18-Mar-10 7:57
professionalAlaric_18-Mar-10 7:57 
AnswerRe: (2.0) ...wanting to show/hide control within a GridView's TableCell.Controls collection. Pin
Alaric_18-Mar-10 10:44
professionalAlaric_18-Mar-10 10:44 
QuestionProblem running deployed application online only - C# .NET 3.51 Pin
Jon Braunsma18-Mar-10 7:42
Jon Braunsma18-Mar-10 7:42 
Questiondegrees to MILS Pin
v17.poornima18-Mar-10 6:47
v17.poornima18-Mar-10 6:47 
AnswerRe: degrees to MILS Pin
PIEBALDconsult18-Mar-10 6:58
mvePIEBALDconsult18-Mar-10 6:58 
GeneralRe: degrees to MILS Pin
Luc Pattyn18-Mar-10 8:16
sitebuilderLuc Pattyn18-Mar-10 8:16 
AnswerRe: degrees to MILS Pin
Keith Barrow18-Mar-10 7:48
professionalKeith Barrow18-Mar-10 7:48 
AnswerRe: degrees to MILS Pin
Saksida Bojan18-Mar-10 7:51
Saksida Bojan18-Mar-10 7:51 
AnswerRe: degrees to MILS [modified] Pin
Dr.Walt Fair, PE18-Mar-10 8:09
professionalDr.Walt Fair, PE18-Mar-10 8:09 
GeneralRe: degrees to MILS Pin
Luc Pattyn18-Mar-10 8:16
sitebuilderLuc Pattyn18-Mar-10 8:16 
GeneralRe: degrees to MILS Pin
Dr.Walt Fair, PE18-Mar-10 8:30
professionalDr.Walt Fair, PE18-Mar-10 8:30 
GeneralRe: degrees to MILS Pin
Luc Pattyn18-Mar-10 8:41
sitebuilderLuc Pattyn18-Mar-10 8:41 

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.