Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: Project Pin
User 171649223-Aug-06 8:35
professionalUser 171649223-Aug-06 8:35 
GeneralRe: Project Pin
drc_no123-Aug-06 8:55
drc_no123-Aug-06 8:55 
GeneralRe: Project Pin
Not Active23-Aug-06 9:04
mentorNot Active23-Aug-06 9:04 
QuestionCircular layout algorithm Pin
Vitaliy Tsvayer23-Aug-06 5:11
Vitaliy Tsvayer23-Aug-06 5:11 
AnswerRe: Circular layout algorithm Pin
Ravi Bhavnani23-Aug-06 5:30
professionalRavi Bhavnani23-Aug-06 5:30 
QuestionLogical Expressions Evaluation... Pin
Shy Agam23-Aug-06 4:49
Shy Agam23-Aug-06 4:49 
AnswerRe: Logical Expressions Evaluation... Pin
Kevin McFarlane23-Aug-06 4:54
Kevin McFarlane23-Aug-06 4:54 
AnswerRe: Logical Expressions Evaluation... Pin
Nader Elshehabi23-Aug-06 5:01
Nader Elshehabi23-Aug-06 5:01 
Hello

No! In the logical OR -aka ||- once a condition is met, no further evaluation is carried out.

To demonstrate this do the following code:

private void MyMethod()
{
    int x = 3;
    if (x < 5 || Hello() == 7)
        return;
}

private int Hello()
{
    MessageBox.Show("Hello");
    return 5;
}


Now change the first condition to be false

private void MyMethod()
{
    int x = 3;
    if (x > 5 || Hello() == 7)
        return;
}

private int Hello()
{
    MessageBox.Show("Hello");
    return 5;
}


You'll see that the messageBox doesn't appear in the first case.

RegardsRose | [Rose]
QuestionBardcode reader query Pin
Rocky#23-Aug-06 4:19
Rocky#23-Aug-06 4:19 
AnswerRe: Bardcode reader query Pin
Nader Elshehabi23-Aug-06 4:51
Nader Elshehabi23-Aug-06 4:51 
GeneralRe: Bardcode reader query Pin
Rocky#24-Aug-06 4:09
Rocky#24-Aug-06 4:09 
QuestionConnect to a remote server Pin
pranu_1323-Aug-06 4:09
pranu_1323-Aug-06 4:09 
AnswerRe: Connect to a remote server Pin
Nader Elshehabi23-Aug-06 4:47
Nader Elshehabi23-Aug-06 4:47 
QuestionDataGridView WordWrap Pin
kalyanPaladugu23-Aug-06 4:03
kalyanPaladugu23-Aug-06 4:03 
AnswerRe: DataGridView WordWrap Pin
Nader Elshehabi23-Aug-06 4:42
Nader Elshehabi23-Aug-06 4:42 
QuestionDataGridView Custom Column Control Events Pin
Itanium23-Aug-06 2:50
Itanium23-Aug-06 2:50 
AnswerRe: DataGridView Custom Column Control Events Pin
Nader Elshehabi23-Aug-06 3:08
Nader Elshehabi23-Aug-06 3:08 
GeneralRe: DataGridView Custom Column Control Events Pin
Itanium23-Aug-06 6:01
Itanium23-Aug-06 6:01 
GeneralRe: DataGridView Custom Column Control Events Pin
Nader Elshehabi23-Aug-06 9:13
Nader Elshehabi23-Aug-06 9:13 
GeneralRe: DataGridView Custom Column Control Events Pin
Itanium23-Aug-06 20:48
Itanium23-Aug-06 20:48 
GeneralRe: DataGridView Custom Column Control Events Pin
Nader Elshehabi24-Aug-06 1:41
Nader Elshehabi24-Aug-06 1:41 
GeneralRe: DataGridView Custom Column Control Events Pin
Itanium24-Aug-06 3:52
Itanium24-Aug-06 3:52 
AnswerRe: DataGridView Custom Column Control Events Pin
Nader Elshehabi5-Sep-06 9:18
Nader Elshehabi5-Sep-06 9:18 
Question"hiding" items in a combox Pin
gus_br23-Aug-06 2:50
gus_br23-Aug-06 2:50 
AnswerRe: "hiding" items in a combox Pin
rah_sin23-Aug-06 2:57
professionalrah_sin23-Aug-06 2:57 

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.