SlideShare a Scribd company logo
iFour ConsultancyBasics of .NET
 Operators
 Control statements
 Access Modifiers
INDEX
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
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
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
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
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
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
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
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
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
Bitwise Operators
Operators (cont.)
Operator Description Example
(A=60=00111100
B=13=0000 1101)
& 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, 0011 1101
^ 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
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
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
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
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
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
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
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
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
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
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
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
• 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
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
 https://www.tutorialspoint.com/csharp/
 http://www.c-sharpcorner.com/UploadFile/mkagrahari/introduction-to-object-oriented-
programming-concepts-in-C-Sharp/
References
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
Questions?
http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India

More Related Content

What's hot (18)

PDF
Practices and tools for building better API (JFall 2013)
Peter Hendriks
 
PDF
.NET Portfolio
mwillmer
 
PDF
Jdbc basic features
Mohammad Faizan
 
PPTX
Mike Taulty MIX10 Silverlight Frameworks and Patterns
ukdpe
 
PDF
Schema-First API Design
Yos Riady
 
PPTX
C#Portfolio
Jeriel_Mikell
 
PPTX
LeverX SAP ABAP Tutorial Creating Function Modules
LeverX
 
PDF
Smartforms interview questions with answers
Uttam Agrawal
 
PDF
Beginner’s tutorial (part 1) integrate redux form in react native application
Katy Slemon
 
PPTX
Abap package concept
Tobias Trapp
 
DOCX
Best PeoplSoft Technical Online Training
Samatha Kamuni
 
PPT
oracle-reports6i
CHANDRASEKHAR REDROUTHU
 
PDF
Microsoft MCPD 70-492 it examen dumps
lilylucy
 
PDF
POS/409 ENTIRE CLASS UOP TUTORIALS
Sharon Reynolds
 
PDF
Capturing requirements: Importing documents
IBM Rational software
 
PPTX
The math api
Adrian Sandru
 
PPTX
Testing soap UI
Razia Sultana
 
PDF
OpenERP data integration in an entreprise context: a war story
Daniel Reis
 
Practices and tools for building better API (JFall 2013)
Peter Hendriks
 
.NET Portfolio
mwillmer
 
Jdbc basic features
Mohammad Faizan
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
ukdpe
 
Schema-First API Design
Yos Riady
 
C#Portfolio
Jeriel_Mikell
 
LeverX SAP ABAP Tutorial Creating Function Modules
LeverX
 
Smartforms interview questions with answers
Uttam Agrawal
 
Beginner’s tutorial (part 1) integrate redux form in react native application
Katy Slemon
 
Abap package concept
Tobias Trapp
 
Best PeoplSoft Technical Online Training
Samatha Kamuni
 
oracle-reports6i
CHANDRASEKHAR REDROUTHU
 
Microsoft MCPD 70-492 it examen dumps
lilylucy
 
POS/409 ENTIRE CLASS UOP TUTORIALS
Sharon Reynolds
 
Capturing requirements: Importing documents
IBM Rational software
 
The math api
Adrian Sandru
 
Testing soap UI
Razia Sultana
 
OpenERP data integration in an entreprise context: a war story
Daniel Reis
 

Viewers also liked (20)

PDF
Up to Speed on HTML 5 and CSS 3
M. Jackson Wilkinson
 
PPTX
Javascript and Jquery: The connection between
Clint LaForest
 
PPTX
Sql server 2012 ha dr
Joseph D'Antoni
 
PPTX
009 sql server management studio
let's go to study
 
PPTX
ASP.NET Core deployment options
Ken Cenerelli
 
PPTX
OOPs fundamentals session for freshers in my office (Aug 5, 13)
Ashoka R K T
 
PPTX
.Net framework architecture
Fad Zulkifli
 
PPTX
Back to the Basics - 1 - Introduction to Web Development
Clint LaForest
 
PPT
ASP.NET OVERVIEW
Rishi Kothari
 
PPT
Future Web Trends - at Innovation series with Jimmy Wales
Matthew Buckland
 
PDF
Your 2012 Marketing Plan: Simple & Powerful
Infusionsoft
 
PPT
HTML 5 Overview
Offir Ariel
 
PPTX
Asp.net page lifecycle
KhademulBasher
 
PPT
HTML 5
Doncho Minkov
 
KEY
HTML 5 & CSS 3
Kevin van Dijk
 
PDF
OOP with C#
Manuel Scapolan
 
PPT
Introduction To Website Development
zaidfarooqui974
 
PPTX
CMS 120: Introduction to Building a Website
Montana State University
 
PPTX
What is HTML 5?
Susan Winters
 
PDF
Gears and HTML 5 @media Ajax London 2008
dion
 
Up to Speed on HTML 5 and CSS 3
M. Jackson Wilkinson
 
Javascript and Jquery: The connection between
Clint LaForest
 
Sql server 2012 ha dr
Joseph D'Antoni
 
009 sql server management studio
let's go to study
 
ASP.NET Core deployment options
Ken Cenerelli
 
OOPs fundamentals session for freshers in my office (Aug 5, 13)
Ashoka R K T
 
.Net framework architecture
Fad Zulkifli
 
Back to the Basics - 1 - Introduction to Web Development
Clint LaForest
 
ASP.NET OVERVIEW
Rishi Kothari
 
Future Web Trends - at Innovation series with Jimmy Wales
Matthew Buckland
 
Your 2012 Marketing Plan: Simple & Powerful
Infusionsoft
 
HTML 5 Overview
Offir Ariel
 
Asp.net page lifecycle
KhademulBasher
 
HTML 5 & CSS 3
Kevin van Dijk
 
OOP with C#
Manuel Scapolan
 
Introduction To Website Development
zaidfarooqui974
 
CMS 120: Introduction to Building a Website
Montana State University
 
What is HTML 5?
Susan Winters
 
Gears and HTML 5 @media Ajax London 2008
dion
 
Ad

Similar to C# fundamentals Part 2 (20)

PDF
C# Fundamentals - Basics of OOPS - Part 2
iFour Technolab Pvt. Ltd.
 
PPTX
11operator in c#
Sireesh K
 
PPTX
2.overview of c#
Raghu nath
 
PPTX
Basic VB.Net & Ms. Acces Integration to creat database application by. Rizki...
rizki209761
 
PPTX
Operators used in vb.net
Jaya Kumari
 
PDF
itft-Operators in java
Atul Sehdev
 
PPTX
03. Operators Expressions and statements
Intro C# Book
 
PPTX
03. operators and-expressions
Stoian Kirov
 
PPTX
Java script session 4
Saif Ullah Dar
 
PPTX
3 operators-expressions-and-statements-120712073351-phpapp01
Abdul Samee
 
PPTX
3 operators-expressions-and-statements-120712073351-phpapp01
Abdul Samee
 
DOCX
Bit shift operators
alldesign
 
PPTX
Session03 operators
HarithaRanasinghe
 
PPTX
Java Operators with Simple introduction.pptx
kuntadinesh21
 
PPTX
Aspdot
Nishad Nizarudeen
 
PPTX
C sharp part 001
Ralph Weber
 
PPTX
Operators in C#
anshika shrivastav
 
PPTX
Chapter 3 : Programming with Java Operators and Strings
It Academy
 
PPTX
Chapter 3:Programming with Java Operators and Strings
It Academy
 
C# Fundamentals - Basics of OOPS - Part 2
iFour Technolab Pvt. Ltd.
 
11operator in c#
Sireesh K
 
2.overview of c#
Raghu nath
 
Basic VB.Net & Ms. Acces Integration to creat database application by. Rizki...
rizki209761
 
Operators used in vb.net
Jaya Kumari
 
itft-Operators in java
Atul Sehdev
 
03. Operators Expressions and statements
Intro C# Book
 
03. operators and-expressions
Stoian Kirov
 
Java script session 4
Saif Ullah Dar
 
3 operators-expressions-and-statements-120712073351-phpapp01
Abdul Samee
 
3 operators-expressions-and-statements-120712073351-phpapp01
Abdul Samee
 
Bit shift operators
alldesign
 
Session03 operators
HarithaRanasinghe
 
Java Operators with Simple introduction.pptx
kuntadinesh21
 
C sharp part 001
Ralph Weber
 
Operators in C#
anshika shrivastav
 
Chapter 3 : Programming with Java Operators and Strings
It Academy
 
Chapter 3:Programming with Java Operators and Strings
It Academy
 
Ad

More from iFour Institute - Sustainable Learning (11)

PPTX
Project Management : Project Planning by iFour Technolab Pvt. Ltd.
iFour Institute - Sustainable Learning
 
PPTX
Project management : Project Monitoring and Control by iFour Technolab Pvt. Ltd.
iFour Institute - Sustainable Learning
 
PPTX
Project management : Causal analysis and Resolution by iFour Technolab Pvt. ...
iFour Institute - Sustainable Learning
 
PPTX
Here are proven techniques to Organizing effective training by iFour Technola...
iFour Institute - Sustainable Learning
 
PPTX
ADO.NET by ASP.NET Development Company in india
iFour Institute - Sustainable Learning
 
PPTX
Web API with ASP.NET MVC by Software development company in india
iFour Institute - Sustainable Learning
 
PPTX
jQuery plugins & JSON
iFour Institute - Sustainable Learning
 
PPTX
Mvc by asp.net development company in india - part 2
iFour Institute - Sustainable Learning
 
PPTX
jQuery for web development
iFour Institute - Sustainable Learning
 
PPTX
Cascading style sheets - CSS
iFour Institute - Sustainable Learning
 
PPTX
HTML Basics by software development company india
iFour Institute - Sustainable Learning
 
Project Management : Project Planning by iFour Technolab Pvt. Ltd.
iFour Institute - Sustainable Learning
 
Project management : Project Monitoring and Control by iFour Technolab Pvt. Ltd.
iFour Institute - Sustainable Learning
 
Project management : Causal analysis and Resolution by iFour Technolab Pvt. ...
iFour Institute - Sustainable Learning
 
Here are proven techniques to Organizing effective training by iFour Technola...
iFour Institute - Sustainable Learning
 
ADO.NET by ASP.NET Development Company in india
iFour Institute - Sustainable Learning
 
Web API with ASP.NET MVC by Software development company in india
iFour Institute - Sustainable Learning
 
Mvc by asp.net development company in india - part 2
iFour Institute - Sustainable Learning
 
jQuery for web development
iFour Institute - Sustainable Learning
 
Cascading style sheets - CSS
iFour Institute - Sustainable Learning
 
HTML Basics by software development company india
iFour Institute - Sustainable Learning
 

Recently uploaded (20)

PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 

C# fundamentals Part 2

  • 2.  Operators  Control statements  Access Modifiers INDEX http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
  • 3. 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 http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
  • 4. 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 http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
  • 5. 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 http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
  • 6. 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 http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
  • 7. Bitwise Operators Operators (cont.) Operator Description Example (A=60=00111100 B=13=0000 1101) & 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, 0011 1101 ^ 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 http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
  • 8. 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 http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
  • 9. 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 http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
  • 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 http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
  • 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 http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
  • 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 http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India
  • 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 http://www.ifourtechnolab.com/ ASP.NET Software Development Companies India

Editor's Notes

  • #2: Software Outsourcing Company India - http://www.ifourtechnolab.com/
  • #4: Software Outsourcing Company India - http://www.ifourtechnolab.com/
  • #5: Software Outsourcing Company India - http://www.ifourtechnolab.com/
  • #6: Software Outsourcing Company India - http://www.ifourtechnolab.com/
  • #7: Software Outsourcing Company India - http://www.ifourtechnolab.com/
  • #8: Software Outsourcing Company India - http://www.ifourtechnolab.com/
  • #9: Software Outsourcing Company India - http://www.ifourtechnolab.com/
  • #10: Software Outsourcing Company India - http://www.ifourtechnolab.com/
  • #11: Software Outsourcing Company India - http://www.ifourtechnolab.com/
  • #12: Software Outsourcing Company India - http://www.ifourtechnolab.com/
  • #13: Software Outsourcing Company India - http://www.ifourtechnolab.com/
  • #14: Software Outsourcing Company India - http://www.ifourtechnolab.com/
  • #15: Software Outsourcing Company India - http://www.ifourtechnolab.com/
  • #16: Software Outsourcing Company India - http://www.ifourtechnolab.com/