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

C#

 
GeneralRe: 2nd code for - boolean error ? Pin
fracalifa2-Jul-05 7:01
fracalifa2-Jul-05 7:01 
GeneralRe: 2nd code for - boolean error ? Pin
Guffa2-Jul-05 7:22
Guffa2-Jul-05 7:22 
GeneralRe: 2nd code for - boolean error ? Pin
DavidNohejl2-Jul-05 7:31
DavidNohejl2-Jul-05 7:31 
AnswerOT Pin
DavidNohejl2-Jul-05 6:57
DavidNohejl2-Jul-05 6:57 
GeneralRe: OT Pin
fracalifa2-Jul-05 7:04
fracalifa2-Jul-05 7:04 
GeneralRe: OT Pin
DavidNohejl2-Jul-05 7:17
DavidNohejl2-Jul-05 7:17 
GeneralRe: OT Pin
Colin Angus Mackay3-Jul-05 1:36
Colin Angus Mackay3-Jul-05 1:36 
Questionerror in bool condition ? Pin
fracalifa1-Jul-05 23:45
fracalifa1-Jul-05 23:45 
Hi all,

coming from "C" I'm a little bit confused on the result of the following boolean term.
I think this can never become TRUE but it does - why ?

if( ((("A"=="A") && ("B"=="B")) || (("A"=="B") && ("B"=="A"))) && (true==false) )
{
MessageBox.Show("Error"); // this code is not reachable ?????
}

A and B is really a comparison of strings

reduced to my understanding is that the results shoud be

if( (((TRUE)&&(TRUE)) ||((FALSE && FALSE))) && (FALSE) ) // should ever be FALSE
........\---------/........\----------/.........|
........... TRUE......||.......FALSE.......&& FALSE
.............\------------------/...............|
.....................TRUE..................&& FALSE = FALSE //!!

the second problem is that the code in the brackets is not reachable ???? Confused | :confused:
the count of backets is correct !
that's leave my understanding of C#

where is my error in thinking ?

Thanks for your help

Frank
AnswerRe: error in bool condition ? Pin
Dario Solera1-Jul-05 23:52
Dario Solera1-Jul-05 23:52 
AnswerRe: error in bool condition ? Pin
Robert Rohde2-Jul-05 0:04
Robert Rohde2-Jul-05 0:04 
GeneralRe: error in bool condition ? Pin
fracalifa2-Jul-05 0:29
fracalifa2-Jul-05 0:29 
AnswerRe: error in bool condition ? Pin
User 66582-Jul-05 1:03
User 66582-Jul-05 1:03 
GeneralRe: error in bool condition ? Pin
fracalifa2-Jul-05 1:10
fracalifa2-Jul-05 1:10 
GeneralRe: error in bool condition ? Pin
User 66582-Jul-05 6:21
User 66582-Jul-05 6:21 
GeneralRe: error in bool condition ? Pin
fracalifa2-Jul-05 6:45
fracalifa2-Jul-05 6:45 
GeneralRe: error in bool condition ? Pin
User 66582-Jul-05 7:52
User 66582-Jul-05 7:52 
GeneralRe: error in bool condition ? Pin
Niklas Ulvinge3-Jul-05 2:53
Niklas Ulvinge3-Jul-05 2:53 
QuestionHow to find relation between user , process created by him and his session Pin
rajee.nedunchezian1-Jul-05 23:37
rajee.nedunchezian1-Jul-05 23:37 
AnswerRe: How to find relation between user , process created by him and his session Pin
Dario Solera1-Jul-05 23:48
Dario Solera1-Jul-05 23:48 
Generalpopulating datagrid with array of objects Pin
deep71-Jul-05 23:34
deep71-Jul-05 23:34 
GeneralChanging Regional Language of a TextBox Pin
Ali Beirami1-Jul-05 23:01
Ali Beirami1-Jul-05 23:01 
GeneralSend a click to an application Pin
Dario Solera1-Jul-05 21:15
Dario Solera1-Jul-05 21:15 
GeneralAdding Help in a software Pin
asmyan1-Jul-05 21:06
asmyan1-Jul-05 21:06 
GeneralRe: Adding Help in a software Pin
Ashok Dhamija1-Jul-05 21:10
Ashok Dhamija1-Jul-05 21:10 
GeneralRe: Adding Help in a software Pin
Dario Solera1-Jul-05 23:55
Dario Solera1-Jul-05 23:55 

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.