214,387 views 207 on YTPak
466 10

Published on 03 Jun 2012 | over 4 years ago

Text version of the video
csharp-video-tutorials.blogspot.co.uk/2012/06/part-5-c-tutorial-common-operators.html

Slides
csharp-video-tutorials.blogspot.com/2013/08/part-5-common-operators-in-c.html

All C# Text Articles
csharp-video-tutorials.blogspot.co.uk/p/free-c-video-tutorial-for-beginners.html

All C# Slides
csharp-video-tutorials.blogspot.com/p/c.html

All Dot Net and SQL Server Tutorials in English
www.youtube.com/user/kudvenkat/playlists

All Dot Net and SQL Server Tutorials in Arabic
www.youtube.com/c/KudvenkatArabic/playlists

In this video, we will discuss the common operators that are available in c# programming language.

Assignment Operator =
Arithmetic Operators like +,-,*,/,%
Conditional Operators like &&, ||
Ternary Operator ?:
Null Coalescing Operator ??

Program without ternary Operator
using System;
class Program
{
static void Main()
{
int Number = 10;

bool IsNumber10;

if (Number == 10)
{
IsNumber10 = true;
}
else
{
IsNumber10 = false;
}

Console.WriteLine("i == 10 is {0}", IsNumber10);
}
}

Same program with ternary Operator
using System;
class Program
{
static void Main()
{
int Number = 10;

bool IsNumber10 = Number == 10 ? true : false;

Console.WriteLine("i == 10 is {0}", IsNumber10);
}
}

Loading related videos...