Tutorial Gateway

  • C
  • C#
  • Java
  • Python
  • SQL
  • MySQL
  • Js
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Python Programs
    • Java Programs
    • SQL FAQ’s

C# Operators

by suresh

C# is just like other programming languages like C, C++, etc. C# is also providing some common operators for specifying the compiler to perform specific manipulations or changes like mathematical operations, logical operations, etc., on the data.

List of C# Operators and their description

C# Operators are basically of three types depending on the number of operands. The operand is nothing but the data on which the operator is working on.

Operators in C#Description
Arithmetic OperatorsThe C# Arithmetic Operators like +, -, *, /, % are useful to tell the compiler to perform specific mathematical calculations on the operands like addition, subtraction, multiplication, division, modulus respectively.
Relational OperatorsRelational Operators like = =, >, >=, <, <=, != generally checks the relation by comparing two variables and gives True or False (Boolean) result. These C# Relational operators are useful in controlling the program flow.
Logical OperatorsLogical Operators like &&, ||, ! allows us to check whether multiple operations are true. Usually, these C# Logical Operators are useful in combination with the relational operators.
Bitwise OperatorsBitwise operators &, |, ^, ~ perform operations on bits. These operators will take the decimal input and will convert decimal to binary, performs bitwise operations, and finally, the binary result is converted to decimal and gives it as output.
Shift OperatorsShift operators like >>, << performs the right shift or left shift on the left operand by moving the left or right side by the number of bits(specified in the right operand).
Unary Operators++, – – are unary operators as these operators work on a single operand. These are also called C# increment and decrement operators.
Assignment OperatorsAssignment Operators like =, + =, – =, / =, % = are used to assign values to the variables. Most commonly used in the real time environment is ‘=’ operator.
Ternary OperatorTernary Operator ?: is also called a conditional operator that works on three operands. 
If the statement is true ? then x : else y
Null Coalescing OperatorVariable x= variable y ?? value.
Variable x will be assigned value if variable y is null; otherwise, the value in the variable y assigned.

Placed Under: C#

  • Dot Net Framework
  • C# Basic Example Program
  • C# Variables
  • C# Constant
  • C# Keywords
  • C# Regular Expressions
  • C# Built in Data Types
  • C# Nullable Types
  • C# Data type Conversion
  • C# Date and Time Format
  • C# Enum or Enumerator
  • C# Value and Reference types
  • C# Operators
  • C# Arithmetic Operators
  • C# Assignment Operators
  • C# Bitwise Operators
  • C# Logical Operators
  • C# Null Coalescing operator
  • C# Relational Operators
  • C# Ternary Operator
  • C# Unary Operators
  • C# If Statement
  • C# If Else Statement
  • C# Else if Statement
  • C# Nested If Statement
  • C# Break Statement
  • C# Continue Statement
  • C# goto statement
  • C# Switch Case
  • C# While Loop
  • C# Do while loop
  • C# For Loop
  • C# Foreach loop
  • C# String Builder
  • C# String
  • C# String Functions
  • C# Array
  • C# Array Functions
  • C# Multi Dimensional Arrays
  • C# Jagged Array
  • C# OOPS Introduction
  • C# Constructor
  • C# Destructor
  • C# Access Modifiers
  • C# Inheritance
  • C Tutorial
  • C# Tutorial
  • Java Tutorial
  • JavaScript Tutorial
  • Python Tutorial
  • MySQL Tutorial
  • SQL Server Tutorial
  • R Tutorial
  • Power BI Tutorial
  • Tableau Tutorial
  • SSIS Tutorial
  • SSRS Tutorial
  • Informatica Tutorial
  • Talend Tutorial
  • C Programs
  • C++ Programs
  • Java Programs
  • Python Programs
  • MDX Tutorial
  • SSAS Tutorial
  • QlikView Tutorial

Copyright © 2021 | Tutorial Gateway· All Rights Reserved by Suresh

Home | About Us | Contact Us | Privacy Policy