07 C# Operators

Hello everyone, last time in C# serious for beginners we talked about the Variables, Constants and Literals in C#
So, this time we are going to learn and know the C# Operators.

What is the Operator ?
An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations.

What are the types/kinds of these Operators ?

  •  Arithmetic Operators: (+, *, /, -, %)
    Arthimetic
    Arthimetic Ex

  •  Relational Operators: (==, !=, >, >=, <. <=)
    Relational

    and here’s an Example on the Relational Operators:
    Relational Ex
  •  Logical Operators: (&&. ||, !)
    Logical

    and here’s an Example on the Logical Operators:
    Logical Ex
  •  Bitwise Operators: (&, |, ^, <<, >>, ~)
    Bitwise

    and here’s an Example on the Bitwise Operators:
    Bitwise Ex
  •  Assignment Operators: (=, +=, -=, *= … etc)
    Assignment

    and here’s an Example on the Assignment Operators:
    Assignment Ex

To, write these Operators in your Program, you should know their Precedence:
precedence

 

Now, we are able to use Operators in our programs easily. 🙂
Source Code: http://1drv.ms/1lajRGG

Next time, we will talk about Decision Making in C#
So, stay tuned 😀

If you need any help or support, don not hesitate to contact me 🙂

 

Advertisements

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