Learning Resources
 

Conditional Logic


In logic, a conditional is a compound statement formed by combining two sentences (or facts) using the words "if ... then."   A conditional can also be called an implication.

The statement:
    
Your teacher tells you that "if you participate in class, then you will get extra points."
fact 1:   "you participate in class."
fact 2:   "you get participation points."

When is the teacher's statement true?

1.  If you participate in class (fact 1 true) and you get extra points (fact 2 true)
     then the teacher's statement is true.

2.  If you participate in class (fact 1 true) and you do not get extra points
    (fact 2 false), then the teacher did not tell the truth and the statement is false.

3.  If you do not participate in class (fact 1 false), we cannot judge the truth
    of the teacher's statement.  The teacher did not tell you what would happen
    if you did NOT participate in class.  Since we cannot accuse the teacher of
    making a false statement, we assign "true" to the statement.

"If you participate in class, then you will get extra points."
 will be true in all cases except one:
when you participate in class and you do NOT get the extra points.

Conditionals are FALSE only when the first condition (if) is true and the second condition (then) is false.  All other cases are TRUE.



ASP .Net has two types of conditions construct which are -