Home > Programming, QA, Test and Automation Stuffs > Decision Making: Equality and relational operators

Decision Making: Equality and relational operators

This section introduces C#’s if structure, wich allows a program to make a decision based on the truth or falsity of some condition. If the condition is met (i.e., the condition is true), the statement in the body of the if structures executes. If the condition is not met (i.e., the condition is false), the body statement does not execute.

Standart algebraic equality operator or relational operator C# equality or relational operator Example of C# condition Meaning of C# condition

=

== X == y

X is equal to y

!=

X != y

X is not equal to y

X > y

X is greater than y

<

X < y

X is less than y

>=

X >= y

X is greater than or equal to y
<= X <=y

X is less than or equal to y

Sources:  C# for experienced programmers – Deitel Developers series

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: