SlideShare a Scribd company logo
iFour ConsultancyBasics of .NET
https://www.ifourtechnolab.com/microsoft-technology
It is a symbol that tells the compiler to perform specific mathematical or logical
manipulations. C# has rich set of built-in operators and provides the following types of
operators
• Arithmetic Operators
• Relational Operators
• Logical Operators
• Bitwise Operators
• Assignment Operators
• Misc Operators
Operators
https://www.ifourtechnolab.com/microsoft-technology
Arithmetic Operators
Operators (cont.)
Operator Description Example(A=10,B=20)
+ Adds two operands A + B = 30
- Subtracts second operand from the first A - B = -10
* Multiplies both operands A * B = 200
/ Divides numerator by de-numerator B / A = 2
% Modulus Operator and remainder of after an
integer division
B % A = 0
++ Increment operator increases integer value by one A++ = 11
-- Decrement operator decreases integer value by
one
A-- = 9
https://www.ifourtechnolab.com/microsoft-technology
Relational Operators
Operators (cont.)
Operator Description Example(A=10,B=20)
== Checks if the values of two operands are equal or not, if yes then condition
becomes true
(A == B) is not true.
!= Checks if the values of two operands are equal or not, if values are not
equal then condition becomes true
(A != B) is true
> Checks if the value of left operand is greater than the value of right
operand, if yes then condition becomes true
(A > B) is not true
< Checks if the value of left operand is less than the value of right operand, if
yes then condition becomes true
(A < B) is true
>= Checks if the value of left operand is greater than or equal to the value of
right operand, if yes then condition becomes true
(A >= B) is not true
<= Checks if the value of left operand is less than or equal to the value of right
operand, if yes then condition becomes true
(A <= B) is true
https://www.ifourtechnolab.com/microsoft-technology
Logical Operators
Operators (cont.)
Operator Description Example
(A=true,B=false)
&& Called Logical AND operator. If both the operands are non zero then
condition becomes true
(A && B) is false
|| Called Logical OR Operator. If any of the two operands is non zero
then condition becomes true
(A || B) is true
! Called Logical NOT Operator. Use to reverses the logical state of its
operand. If a condition is true then Logical NOT operator will make
false
!(A && B) is true
https://www.ifourtechnolab.com/microsoft-technology
Bitwise Operators
Operators (cont.)
Operator Description Example
(A=60=00111100
B=13=00001101)
& Binary AND Operator copies a bit to the result if it exists in both operands (A & B) = 12, 00001100
| Binary OR Operator copies a bit if it exists in either operand (A | B) = 61, 00111101
^ Binary XOR Operator copies the bit if it is set in one operand but not both (A ^ B) = 49, 00110001
~ Binary Ones Complement Operator is unary and has the effect of 'flipping' bits (~A ) = 61, which is 1100
0011
<< Binary Left Shift Operator. The left operands value is moved left by the number of
bits specified by the right operand
A << 2 = 240, which is
1111 0000
>> Binary Right Shift Operator. The left operands value is moved right by the number
of bits specified by the right operand
A >> 2 = 15, which is 0000
1111
https://www.ifourtechnolab.com/microsoft-technology
Assignment Operators
Operators (cont.)
Operator Description Example
= Binary AND Operator copies a bit to the result if it exists in both operands. C = A + B assigns value of
A + B into C
+= Add AND assignment operator, It adds right operand to the left operand and
assign the result to left operand
C += A is equivalent to C =
C + A
-= Subtract AND assignment operator, It subtracts right operand from the left
operand and assign the result to left operand
C-=A is equivalent to C=C-
A
*= Multiply AND assignment operator, It multiplies right operand with the left
operand and assign the result to left operand
C *= A is equivalent to C =
C * A
/= Divide AND assignment operator, It divides left operand with the right operand
and assign the result to left operand
C /= A is equivalent to C =
C / A
%= Modulus AND assignment operator, It takes modulus using two operands and
assign the result to left operand
C %= A is equivalent to C
= C % A
https://www.ifourtechnolab.com/microsoft-technology
Assignment Operators
Operators (cont.)
Operator Description Example
<<= Left shift AND assignment operator C <<= 2 is same as C =
C << 2
>>= Right shift AND assignment operator C >>= 2 is same as C =
C >> 2
&= Bitwise AND assignment operator C &= 2 is same as C = C
& 2
^= bitwise exclusive OR and assignment operator C ^= 2 is same as C = C
^ 2
%= bitwise inclusive OR and assignment operator C |= 2 is same as C = C
| 2
https://www.ifourtechnolab.com/microsoft-technology
Miscellaneous Operators
sizeof()
typeof()
&
*
? :
Is
as
Operators (cont.)
https://www.ifourtechnolab.com/microsoft-technology
Statement that determines whether other statements will be executed
• if statement decides whether to execute another statement, or decides which of two
statements to execute
• If -else :If the boolean expression evaluates to true, then the if block of code is executed,
otherwise else block of code is executed
• A switch statement decides which of several statements to execute
• for loops are (typically) used to execute the controlled statement a given number of times.
• The foreach statement repeats a group of embedded statements for each element in an array
or an object collection that implements
• while loops test whether a condition is true before executing the controlled statement
• do-while loops test whether a condition is true after executing the controlled statement
Control statements
https://www.ifourtechnolab.com/microsoft-technology
Public
• The public keyword is an access modifier for types and type members. Public access is the most
permissive access level
• Accessibility:
• Can be accessed by objects of the class
• Can be accessed by derived classes
Private
• Private members are accessible only within the body of the class or the struct in which they are
declared
• Accessibility:
• Cannot be accessed by object
• Cannot be accessed by derived classes
Access Modifiers
https://www.ifourtechnolab.com/microsoft-technology
Protected
• A protected member is accessible from within the class in which it is declared, and from within
any class derived from the class that declared this member
• Accessibility:
• Cannot be accessed by object
• By derived classes
Internal
• Access modifier for types and type members. We can declare a class as internal or its member
as internal. Internal members are accessible only within files in the same assembly
• Access is limited exclusively to classes defined within the current project assembly
Access Modifiers
https://www.ifourtechnolab.com/microsoft-technology
• Accessibility:
• In same assembly (public)
• Can be accessed by objects of the class
• Can be accessed by derived classes
• In other assembly (internal)
• Cannot be accessed by object
• Cannot be accessed by derived classes
Protected Internal
• The protected internal accessibility means protected OR internal, not protected AND internal
• In other words, a protected internal member is accessible from any class in the same assembly,
including derived classes
Access Modifiers
https://www.ifourtechnolab.com/microsoft-technology
Thank You..
https://www.ifourtechnolab.com/microsoft-technology

More Related Content

What's hot

Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++
Himanshu Kaushik
 
C operators
C operatorsC operators
C operators
GPERI
 
Expression and Operartor In C Programming
Expression and Operartor In C Programming Expression and Operartor In C Programming
Expression and Operartor In C Programming
Kamal Acharya
 
Python operators
Python operatorsPython operators
Python operators
SaurabhUpadhyay73
 
C Operators
C OperatorsC Operators
C Operators
Yash Modi
 
Increment and Decrement operators in C++
Increment and Decrement operators in C++Increment and Decrement operators in C++
Increment and Decrement operators in C++
Neeru Mittal
 
Types of operators in C
Types of operators in CTypes of operators in C
Types of operators in C
Prabhu Govind
 
2. operators in c
2. operators in c2. operators in c
2. operators in c
amar kakde
 
Operators in Python
Operators in PythonOperators in Python
Operators in Python
Anusuya123
 
C Prog. - Operators and Expressions
C Prog. - Operators and ExpressionsC Prog. - Operators and Expressions
C Prog. - Operators and Expressions
vinay arora
 
Expressions in c++
 Expressions in c++ Expressions in c++
Expressions in c++
zeeshan turi
 
Operators
OperatorsOperators
Operation and expression in c++
Operation and expression in c++Operation and expression in c++
Operation and expression in c++
Online
 
C# operators
C# operatorsC# operators
Operators and expressions
Operators and expressionsOperators and expressions
Operators and expressions
vishaljot_kaur
 
11operator in c#
11operator in c#11operator in c#
11operator in c#
Sireesh K
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
programming9
 
Chapter 5 - Operators in C++
Chapter 5 - Operators in C++Chapter 5 - Operators in C++
Chapter 5 - Operators in C++
Deepak Singh
 
Python : basic operators
Python : basic operatorsPython : basic operators
Python : basic operators
S.M. Salaquzzaman
 

What's hot (19)

Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++
 
C operators
C operatorsC operators
C operators
 
Expression and Operartor In C Programming
Expression and Operartor In C Programming Expression and Operartor In C Programming
Expression and Operartor In C Programming
 
Python operators
Python operatorsPython operators
Python operators
 
C Operators
C OperatorsC Operators
C Operators
 
Increment and Decrement operators in C++
Increment and Decrement operators in C++Increment and Decrement operators in C++
Increment and Decrement operators in C++
 
Types of operators in C
Types of operators in CTypes of operators in C
Types of operators in C
 
2. operators in c
2. operators in c2. operators in c
2. operators in c
 
Operators in Python
Operators in PythonOperators in Python
Operators in Python
 
C Prog. - Operators and Expressions
C Prog. - Operators and ExpressionsC Prog. - Operators and Expressions
C Prog. - Operators and Expressions
 
Expressions in c++
 Expressions in c++ Expressions in c++
Expressions in c++
 
Operators
OperatorsOperators
Operators
 
Operation and expression in c++
Operation and expression in c++Operation and expression in c++
Operation and expression in c++
 
C# operators
C# operatorsC# operators
C# operators
 
Operators and expressions
Operators and expressionsOperators and expressions
Operators and expressions
 
11operator in c#
11operator in c#11operator in c#
11operator in c#
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
Chapter 5 - Operators in C++
Chapter 5 - Operators in C++Chapter 5 - Operators in C++
Chapter 5 - Operators in C++
 
Python : basic operators
Python : basic operatorsPython : basic operators
Python : basic operators
 

Similar to C# Fundamentals - Basics of OOPS - Part 2

C# fundamentals Part 2
C# fundamentals Part 2C# fundamentals Part 2
Constructor and destructors
Constructor and destructorsConstructor and destructors
Constructor and destructors
divyalakshmi77
 
2.overview of c#
2.overview of c#2.overview of c#
2.overview of c#
Raghu nath
 
Computer programming 2 Lesson 7
Computer programming 2  Lesson 7Computer programming 2  Lesson 7
Computer programming 2 Lesson 7
MLG College of Learning, Inc
 
Operators In Java Part - 8
Operators In Java Part - 8Operators In Java Part - 8
Operators In Java Part - 8
MuhammadAtif231
 
Java unit1 b- Java Operators to Methods
Java  unit1 b- Java Operators to MethodsJava  unit1 b- Java Operators to Methods
Java unit1 b- Java Operators to Methods
SivaSankari36
 
Programming C Part 02
Programming C Part 02Programming C Part 02
Programming C Part 02
Raselmondalmehedi
 
Programming presentation
Programming presentationProgramming presentation
Programming presentation
Fiaz Khokhar
 
Operators and it's type
Operators and it's type Operators and it's type
Operators and it's type
Asheesh kushwaha
 
C sharp part 001
C sharp part 001C sharp part 001
C sharp part 001
Ralph Weber
 
C++ chapter 2
C++ chapter 2C++ chapter 2
C++ chapter 2
SHRIRANG PINJARKAR
 
Java basic operators
Java basic operatorsJava basic operators
Java basic operators
Emmanuel Alimpolos
 
Java basic operators
Java basic operatorsJava basic operators
Java basic operators
Emmanuel Alimpolos
 
Session03 operators
Session03 operatorsSession03 operators
Session03 operators
HarithaRanasinghe
 
Arithmetic and increment decrement Operator
Arithmetic and increment decrement OperatorArithmetic and increment decrement Operator
Arithmetic and increment decrement Operator
Megha Sharma
 
itft-Operators in java
itft-Operators in javaitft-Operators in java
itft-Operators in java
Atul Sehdev
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
michaelaaron25322
 
Operators in C#
Operators in C#Operators in C#
Operators in C#
anshika shrivastav
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
Neeru Mittal
 
PE1 Module 2.ppt
PE1 Module 2.pptPE1 Module 2.ppt
PE1 Module 2.ppt
balewayalew
 

Similar to C# Fundamentals - Basics of OOPS - Part 2 (20)

C# fundamentals Part 2
C# fundamentals Part 2C# fundamentals Part 2
C# fundamentals Part 2
 
Constructor and destructors
Constructor and destructorsConstructor and destructors
Constructor and destructors
 
2.overview of c#
2.overview of c#2.overview of c#
2.overview of c#
 
Computer programming 2 Lesson 7
Computer programming 2  Lesson 7Computer programming 2  Lesson 7
Computer programming 2 Lesson 7
 
Operators In Java Part - 8
Operators In Java Part - 8Operators In Java Part - 8
Operators In Java Part - 8
 
Java unit1 b- Java Operators to Methods
Java  unit1 b- Java Operators to MethodsJava  unit1 b- Java Operators to Methods
Java unit1 b- Java Operators to Methods
 
Programming C Part 02
Programming C Part 02Programming C Part 02
Programming C Part 02
 
Programming presentation
Programming presentationProgramming presentation
Programming presentation
 
Operators and it's type
Operators and it's type Operators and it's type
Operators and it's type
 
C sharp part 001
C sharp part 001C sharp part 001
C sharp part 001
 
C++ chapter 2
C++ chapter 2C++ chapter 2
C++ chapter 2
 
Java basic operators
Java basic operatorsJava basic operators
Java basic operators
 
Java basic operators
Java basic operatorsJava basic operators
Java basic operators
 
Session03 operators
Session03 operatorsSession03 operators
Session03 operators
 
Arithmetic and increment decrement Operator
Arithmetic and increment decrement OperatorArithmetic and increment decrement Operator
Arithmetic and increment decrement Operator
 
itft-Operators in java
itft-Operators in javaitft-Operators in java
itft-Operators in java
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
 
Operators in C#
Operators in C#Operators in C#
Operators in C#
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
 
PE1 Module 2.ppt
PE1 Module 2.pptPE1 Module 2.ppt
PE1 Module 2.ppt
 

More from iFour Technolab Pvt. Ltd.

Software for Physiotherapists (+Physio) - Final.pdf
Software for Physiotherapists (+Physio) - Final.pdfSoftware for Physiotherapists (+Physio) - Final.pdf
Software for Physiotherapists (+Physio) - Final.pdf
iFour Technolab Pvt. Ltd.
 
Evolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdfEvolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdf
iFour Technolab Pvt. Ltd.
 
iFour Technolab - .NET Development Company Profile
iFour Technolab - .NET Development Company ProfileiFour Technolab - .NET Development Company Profile
iFour Technolab - .NET Development Company Profile
iFour Technolab Pvt. Ltd.
 
Java9to19Final.pptx
Java9to19Final.pptxJava9to19Final.pptx
Java9to19Final.pptx
iFour Technolab Pvt. Ltd.
 
Meetup - IoT with Azure behind the scenes 2022.pptx
Meetup - IoT with Azure behind the scenes 2022.pptxMeetup - IoT with Azure behind the scenes 2022.pptx
Meetup - IoT with Azure behind the scenes 2022.pptx
iFour Technolab Pvt. Ltd.
 
LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022
LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022
LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022
iFour Technolab Pvt. Ltd.
 
NFT_Meetup - iFour Technolab.pptx
NFT_Meetup - iFour Technolab.pptxNFT_Meetup - iFour Technolab.pptx
NFT_Meetup - iFour Technolab.pptx
iFour Technolab Pvt. Ltd.
 
Complete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour TechnolabComplete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour Technolab
iFour Technolab Pvt. Ltd.
 
ASP Dot Net Software Development in India - iFour Technolab
ASP Dot Net Software Development in India - iFour TechnolabASP Dot Net Software Development in India - iFour Technolab
ASP Dot Net Software Development in India - iFour Technolab
iFour Technolab Pvt. Ltd.
 
Basic Introduction and Overview of Vue.js
Basic Introduction and Overview of Vue.jsBasic Introduction and Overview of Vue.js
Basic Introduction and Overview of Vue.js
iFour Technolab Pvt. Ltd.
 
Basic Introduction of VSTO Office Add-in Software Development - iFour Technolab
Basic Introduction of VSTO Office Add-in Software Development - iFour TechnolabBasic Introduction of VSTO Office Add-in Software Development - iFour Technolab
Basic Introduction of VSTO Office Add-in Software Development - iFour Technolab
iFour Technolab Pvt. Ltd.
 
Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.
iFour Technolab Pvt. Ltd.
 
Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.
iFour Technolab Pvt. Ltd.
 
Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.
iFour Technolab Pvt. Ltd.
 
An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)
iFour Technolab Pvt. Ltd.
 
Tutorial on Node File System
Tutorial on Node File SystemTutorial on Node File System
Tutorial on Node File System
iFour Technolab Pvt. Ltd.
 
MongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & ExecutionMongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & Execution
iFour Technolab Pvt. Ltd.
 
Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)
iFour Technolab Pvt. Ltd.
 
Agile Project Management with Scrum PDF
Agile Project Management with Scrum PDFAgile Project Management with Scrum PDF
Agile Project Management with Scrum PDF
iFour Technolab Pvt. Ltd.
 
Understanding Agile Development with Scrum
Understanding Agile Development with ScrumUnderstanding Agile Development with Scrum
Understanding Agile Development with Scrum
iFour Technolab Pvt. Ltd.
 

More from iFour Technolab Pvt. Ltd. (20)

Software for Physiotherapists (+Physio) - Final.pdf
Software for Physiotherapists (+Physio) - Final.pdfSoftware for Physiotherapists (+Physio) - Final.pdf
Software for Physiotherapists (+Physio) - Final.pdf
 
Evolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdfEvolution and History of Angular as Web Development Platform.pdf
Evolution and History of Angular as Web Development Platform.pdf
 
iFour Technolab - .NET Development Company Profile
iFour Technolab - .NET Development Company ProfileiFour Technolab - .NET Development Company Profile
iFour Technolab - .NET Development Company Profile
 
Java9to19Final.pptx
Java9to19Final.pptxJava9to19Final.pptx
Java9to19Final.pptx
 
Meetup - IoT with Azure behind the scenes 2022.pptx
Meetup - IoT with Azure behind the scenes 2022.pptxMeetup - IoT with Azure behind the scenes 2022.pptx
Meetup - IoT with Azure behind the scenes 2022.pptx
 
LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022
LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022
LAZY IS NEW SMART LET IoT HANDLE IT - Meet UP 2022
 
NFT_Meetup - iFour Technolab.pptx
NFT_Meetup - iFour Technolab.pptxNFT_Meetup - iFour Technolab.pptx
NFT_Meetup - iFour Technolab.pptx
 
Complete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour TechnolabComplete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour Technolab
 
ASP Dot Net Software Development in India - iFour Technolab
ASP Dot Net Software Development in India - iFour TechnolabASP Dot Net Software Development in India - iFour Technolab
ASP Dot Net Software Development in India - iFour Technolab
 
Basic Introduction and Overview of Vue.js
Basic Introduction and Overview of Vue.jsBasic Introduction and Overview of Vue.js
Basic Introduction and Overview of Vue.js
 
Basic Introduction of VSTO Office Add-in Software Development - iFour Technolab
Basic Introduction of VSTO Office Add-in Software Development - iFour TechnolabBasic Introduction of VSTO Office Add-in Software Development - iFour Technolab
Basic Introduction of VSTO Office Add-in Software Development - iFour Technolab
 
Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Case in Legal Industry - iFour Technolab Pvt. Ltd.
 
Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Healthcare Industry - iFour Technolab Pvt. Ltd.
 
Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.
Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.
 
An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)
 
Tutorial on Node File System
Tutorial on Node File SystemTutorial on Node File System
Tutorial on Node File System
 
MongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & ExecutionMongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & Execution
 
Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)
 
Agile Project Management with Scrum PDF
Agile Project Management with Scrum PDFAgile Project Management with Scrum PDF
Agile Project Management with Scrum PDF
 
Understanding Agile Development with Scrum
Understanding Agile Development with ScrumUnderstanding Agile Development with Scrum
Understanding Agile Development with Scrum
 

Recently uploaded

Company Valuation webinar series - Tuesday, 4 June 2024
Company Valuation webinar series - Tuesday, 4 June 2024Company Valuation webinar series - Tuesday, 4 June 2024
Company Valuation webinar series - Tuesday, 4 June 2024
FelixPerez547899
 
Building Your Employer Brand with Social Media
Building Your Employer Brand with Social MediaBuilding Your Employer Brand with Social Media
Building Your Employer Brand with Social Media
LuanWise
 
Training my puppy and implementation in this story
Training my puppy and implementation in this storyTraining my puppy and implementation in this story
Training my puppy and implementation in this story
WilliamRodrigues148
 
Anny Serafina Love - Letter of Recommendation by Kellen Harkins, MS.
Anny Serafina Love - Letter of Recommendation by Kellen Harkins, MS.Anny Serafina Love - Letter of Recommendation by Kellen Harkins, MS.
Anny Serafina Love - Letter of Recommendation by Kellen Harkins, MS.
AnnySerafinaLove
 
Mastering B2B Payments Webinar from BlueSnap
Mastering B2B Payments Webinar from BlueSnapMastering B2B Payments Webinar from BlueSnap
Mastering B2B Payments Webinar from BlueSnap
Norma Mushkat Gaffin
 
Recruiting in the Digital Age: A Social Media Masterclass
Recruiting in the Digital Age: A Social Media MasterclassRecruiting in the Digital Age: A Social Media Masterclass
Recruiting in the Digital Age: A Social Media Masterclass
LuanWise
 
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdfModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
fisherameliaisabella
 
Observation Lab PowerPoint Assignment for TEM 431
Observation Lab PowerPoint Assignment for TEM 431Observation Lab PowerPoint Assignment for TEM 431
Observation Lab PowerPoint Assignment for TEM 431
ecamare2
 
Zodiac Signs and Food Preferences_ What Your Sign Says About Your Taste
Zodiac Signs and Food Preferences_ What Your Sign Says About Your TasteZodiac Signs and Food Preferences_ What Your Sign Says About Your Taste
Zodiac Signs and Food Preferences_ What Your Sign Says About Your Taste
my Pandit
 
-- June 2024 is National Volunteer Month --
-- June 2024 is National Volunteer Month ---- June 2024 is National Volunteer Month --
-- June 2024 is National Volunteer Month --
NZSG
 
Best practices for project execution and delivery
Best practices for project execution and deliveryBest practices for project execution and delivery
Best practices for project execution and delivery
CLIVE MINCHIN
 
Chapter 7 Final business management sciences .ppt
Chapter 7 Final business management sciences .pptChapter 7 Final business management sciences .ppt
Chapter 7 Final business management sciences .ppt
ssuser567e2d
 
The Influence of Marketing Strategy and Market Competition on Business Perfor...
The Influence of Marketing Strategy and Market Competition on Business Perfor...The Influence of Marketing Strategy and Market Competition on Business Perfor...
The Influence of Marketing Strategy and Market Competition on Business Perfor...
Adam Smith
 
BeMetals Investor Presentation_June 1, 2024.pdf
BeMetals Investor Presentation_June 1, 2024.pdfBeMetals Investor Presentation_June 1, 2024.pdf
BeMetals Investor Presentation_June 1, 2024.pdf
DerekIwanaka1
 
Hamster Kombat' Telegram Game Surpasses 100 Million Players—Token Release Sch...
Hamster Kombat' Telegram Game Surpasses 100 Million Players—Token Release Sch...Hamster Kombat' Telegram Game Surpasses 100 Million Players—Token Release Sch...
Hamster Kombat' Telegram Game Surpasses 100 Million Players—Token Release Sch...
SOFTTECHHUB
 
Event Report - SAP Sapphire 2024 Orlando - lots of innovation and old challenges
Event Report - SAP Sapphire 2024 Orlando - lots of innovation and old challengesEvent Report - SAP Sapphire 2024 Orlando - lots of innovation and old challenges
Event Report - SAP Sapphire 2024 Orlando - lots of innovation and old challenges
Holger Mueller
 
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Satta Matka
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Satta MatkaDpboss Matka Guessing Satta Matta Matka Kalyan Chart Satta Matka
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Satta Matka
➒➌➎➏➑➐➋➑➐➐Dpboss Matka Guessing Satta Matka Kalyan Chart Indian Matka
 
Authentically Social Presented by Corey Perlman
Authentically Social Presented by Corey PerlmanAuthentically Social Presented by Corey Perlman
Authentically Social Presented by Corey Perlman
Corey Perlman, Social Media Speaker and Consultant
 
amptalk_RecruitingDeck_english_2024.06.05
amptalk_RecruitingDeck_english_2024.06.05amptalk_RecruitingDeck_english_2024.06.05
amptalk_RecruitingDeck_english_2024.06.05
marketing317746
 
Organizational Change Leadership Agile Tour Geneve 2024
Organizational Change Leadership Agile Tour Geneve 2024Organizational Change Leadership Agile Tour Geneve 2024
Organizational Change Leadership Agile Tour Geneve 2024
Kirill Klimov
 

Recently uploaded (20)

Company Valuation webinar series - Tuesday, 4 June 2024
Company Valuation webinar series - Tuesday, 4 June 2024Company Valuation webinar series - Tuesday, 4 June 2024
Company Valuation webinar series - Tuesday, 4 June 2024
 
Building Your Employer Brand with Social Media
Building Your Employer Brand with Social MediaBuilding Your Employer Brand with Social Media
Building Your Employer Brand with Social Media
 
Training my puppy and implementation in this story
Training my puppy and implementation in this storyTraining my puppy and implementation in this story
Training my puppy and implementation in this story
 
Anny Serafina Love - Letter of Recommendation by Kellen Harkins, MS.
Anny Serafina Love - Letter of Recommendation by Kellen Harkins, MS.Anny Serafina Love - Letter of Recommendation by Kellen Harkins, MS.
Anny Serafina Love - Letter of Recommendation by Kellen Harkins, MS.
 
Mastering B2B Payments Webinar from BlueSnap
Mastering B2B Payments Webinar from BlueSnapMastering B2B Payments Webinar from BlueSnap
Mastering B2B Payments Webinar from BlueSnap
 
Recruiting in the Digital Age: A Social Media Masterclass
Recruiting in the Digital Age: A Social Media MasterclassRecruiting in the Digital Age: A Social Media Masterclass
Recruiting in the Digital Age: A Social Media Masterclass
 
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdfModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
 
Observation Lab PowerPoint Assignment for TEM 431
Observation Lab PowerPoint Assignment for TEM 431Observation Lab PowerPoint Assignment for TEM 431
Observation Lab PowerPoint Assignment for TEM 431
 
Zodiac Signs and Food Preferences_ What Your Sign Says About Your Taste
Zodiac Signs and Food Preferences_ What Your Sign Says About Your TasteZodiac Signs and Food Preferences_ What Your Sign Says About Your Taste
Zodiac Signs and Food Preferences_ What Your Sign Says About Your Taste
 
-- June 2024 is National Volunteer Month --
-- June 2024 is National Volunteer Month ---- June 2024 is National Volunteer Month --
-- June 2024 is National Volunteer Month --
 
Best practices for project execution and delivery
Best practices for project execution and deliveryBest practices for project execution and delivery
Best practices for project execution and delivery
 
Chapter 7 Final business management sciences .ppt
Chapter 7 Final business management sciences .pptChapter 7 Final business management sciences .ppt
Chapter 7 Final business management sciences .ppt
 
The Influence of Marketing Strategy and Market Competition on Business Perfor...
The Influence of Marketing Strategy and Market Competition on Business Perfor...The Influence of Marketing Strategy and Market Competition on Business Perfor...
The Influence of Marketing Strategy and Market Competition on Business Perfor...
 
BeMetals Investor Presentation_June 1, 2024.pdf
BeMetals Investor Presentation_June 1, 2024.pdfBeMetals Investor Presentation_June 1, 2024.pdf
BeMetals Investor Presentation_June 1, 2024.pdf
 
Hamster Kombat' Telegram Game Surpasses 100 Million Players—Token Release Sch...
Hamster Kombat' Telegram Game Surpasses 100 Million Players—Token Release Sch...Hamster Kombat' Telegram Game Surpasses 100 Million Players—Token Release Sch...
Hamster Kombat' Telegram Game Surpasses 100 Million Players—Token Release Sch...
 
Event Report - SAP Sapphire 2024 Orlando - lots of innovation and old challenges
Event Report - SAP Sapphire 2024 Orlando - lots of innovation and old challengesEvent Report - SAP Sapphire 2024 Orlando - lots of innovation and old challenges
Event Report - SAP Sapphire 2024 Orlando - lots of innovation and old challenges
 
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Satta Matka
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Satta MatkaDpboss Matka Guessing Satta Matta Matka Kalyan Chart Satta Matka
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Satta Matka
 
Authentically Social Presented by Corey Perlman
Authentically Social Presented by Corey PerlmanAuthentically Social Presented by Corey Perlman
Authentically Social Presented by Corey Perlman
 
amptalk_RecruitingDeck_english_2024.06.05
amptalk_RecruitingDeck_english_2024.06.05amptalk_RecruitingDeck_english_2024.06.05
amptalk_RecruitingDeck_english_2024.06.05
 
Organizational Change Leadership Agile Tour Geneve 2024
Organizational Change Leadership Agile Tour Geneve 2024Organizational Change Leadership Agile Tour Geneve 2024
Organizational Change Leadership Agile Tour Geneve 2024
 

C# Fundamentals - Basics of OOPS - Part 2

  • 1. iFour ConsultancyBasics of .NET https://www.ifourtechnolab.com/microsoft-technology
  • 2. It is a symbol that tells the compiler to perform specific mathematical or logical manipulations. C# has rich set of built-in operators and provides the following types of operators • Arithmetic Operators • Relational Operators • Logical Operators • Bitwise Operators • Assignment Operators • Misc Operators Operators https://www.ifourtechnolab.com/microsoft-technology
  • 3. Arithmetic Operators Operators (cont.) Operator Description Example(A=10,B=20) + Adds two operands A + B = 30 - Subtracts second operand from the first A - B = -10 * Multiplies both operands A * B = 200 / Divides numerator by de-numerator B / A = 2 % Modulus Operator and remainder of after an integer division B % A = 0 ++ Increment operator increases integer value by one A++ = 11 -- Decrement operator decreases integer value by one A-- = 9 https://www.ifourtechnolab.com/microsoft-technology
  • 4. Relational Operators Operators (cont.) Operator Description Example(A=10,B=20) == Checks if the values of two operands are equal or not, if yes then condition becomes true (A == B) is not true. != Checks if the values of two operands are equal or not, if values are not equal then condition becomes true (A != B) is true > Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true (A > B) is not true < Checks if the value of left operand is less than the value of right operand, if yes then condition becomes true (A < B) is true >= Checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true (A >= B) is not true <= Checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true (A <= B) is true https://www.ifourtechnolab.com/microsoft-technology
  • 5. Logical Operators Operators (cont.) Operator Description Example (A=true,B=false) && Called Logical AND operator. If both the operands are non zero then condition becomes true (A && B) is false || Called Logical OR Operator. If any of the two operands is non zero then condition becomes true (A || B) is true ! Called Logical NOT Operator. Use to reverses the logical state of its operand. If a condition is true then Logical NOT operator will make false !(A && B) is true https://www.ifourtechnolab.com/microsoft-technology
  • 6. Bitwise Operators Operators (cont.) Operator Description Example (A=60=00111100 B=13=00001101) & Binary AND Operator copies a bit to the result if it exists in both operands (A & B) = 12, 00001100 | Binary OR Operator copies a bit if it exists in either operand (A | B) = 61, 00111101 ^ Binary XOR Operator copies the bit if it is set in one operand but not both (A ^ B) = 49, 00110001 ~ Binary Ones Complement Operator is unary and has the effect of 'flipping' bits (~A ) = 61, which is 1100 0011 << Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand A << 2 = 240, which is 1111 0000 >> Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand A >> 2 = 15, which is 0000 1111 https://www.ifourtechnolab.com/microsoft-technology
  • 7. Assignment Operators Operators (cont.) Operator Description Example = Binary AND Operator copies a bit to the result if it exists in both operands. C = A + B assigns value of A + B into C += Add AND assignment operator, It adds right operand to the left operand and assign the result to left operand C += A is equivalent to C = C + A -= Subtract AND assignment operator, It subtracts right operand from the left operand and assign the result to left operand C-=A is equivalent to C=C- A *= Multiply AND assignment operator, It multiplies right operand with the left operand and assign the result to left operand C *= A is equivalent to C = C * A /= Divide AND assignment operator, It divides left operand with the right operand and assign the result to left operand C /= A is equivalent to C = C / A %= Modulus AND assignment operator, It takes modulus using two operands and assign the result to left operand C %= A is equivalent to C = C % A https://www.ifourtechnolab.com/microsoft-technology
  • 8. Assignment Operators Operators (cont.) Operator Description Example <<= Left shift AND assignment operator C <<= 2 is same as C = C << 2 >>= Right shift AND assignment operator C >>= 2 is same as C = C >> 2 &= Bitwise AND assignment operator C &= 2 is same as C = C & 2 ^= bitwise exclusive OR and assignment operator C ^= 2 is same as C = C ^ 2 %= bitwise inclusive OR and assignment operator C |= 2 is same as C = C | 2 https://www.ifourtechnolab.com/microsoft-technology
  • 9. Miscellaneous Operators sizeof() typeof() & * ? : Is as Operators (cont.) https://www.ifourtechnolab.com/microsoft-technology
  • 10. Statement that determines whether other statements will be executed • if statement decides whether to execute another statement, or decides which of two statements to execute • If -else :If the boolean expression evaluates to true, then the if block of code is executed, otherwise else block of code is executed • A switch statement decides which of several statements to execute • for loops are (typically) used to execute the controlled statement a given number of times. • The foreach statement repeats a group of embedded statements for each element in an array or an object collection that implements • while loops test whether a condition is true before executing the controlled statement • do-while loops test whether a condition is true after executing the controlled statement Control statements https://www.ifourtechnolab.com/microsoft-technology
  • 11. Public • The public keyword is an access modifier for types and type members. Public access is the most permissive access level • Accessibility: • Can be accessed by objects of the class • Can be accessed by derived classes Private • Private members are accessible only within the body of the class or the struct in which they are declared • Accessibility: • Cannot be accessed by object • Cannot be accessed by derived classes Access Modifiers https://www.ifourtechnolab.com/microsoft-technology
  • 12. Protected • A protected member is accessible from within the class in which it is declared, and from within any class derived from the class that declared this member • Accessibility: • Cannot be accessed by object • By derived classes Internal • Access modifier for types and type members. We can declare a class as internal or its member as internal. Internal members are accessible only within files in the same assembly • Access is limited exclusively to classes defined within the current project assembly Access Modifiers https://www.ifourtechnolab.com/microsoft-technology
  • 13. • Accessibility: • In same assembly (public) • Can be accessed by objects of the class • Can be accessed by derived classes • In other assembly (internal) • Cannot be accessed by object • Cannot be accessed by derived classes Protected Internal • The protected internal accessibility means protected OR internal, not protected AND internal • In other words, a protected internal member is accessible from any class in the same assembly, including derived classes Access Modifiers https://www.ifourtechnolab.com/microsoft-technology