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