SlideShare una empresa de Scribd logo
1 de 52
Maha EL-basuony OOP
 Agenda
 Array a data structure that contains several variables of the same type.  One Dimensional Array Type  [ ] Array_Name = new int [arraySize];  Examples int[] myIntArray = {5, 9, 10, 2, 99};  int[] myIntArray = new int[5];  int[] myIntArray = new int[5] {5, 9, 10, 2, 99};
 Multidimensional Arrays   -A two - dimensional array such as this is declared as follows:   <  baseType  > [ , ]  <  name  >   Examples double[ , ] hillHeight = new double[3,4];  int[ , ] hillHeight = {{1, 2, 3, 4}, {2, 3, 4, 5}, {3, 4, 5, 6}};
 Arrays of Arrays int[][] MyArray;  MyArray = {{1, 2, 3}, {1}, {1, 2}};  int[][] MyArray = {new int[] {1, 2, 3}, new int[] {1}, new int[]{1,2}};  MyArray = new int[2][]; MyArray[0] = new int[3]; MyArray[1] = new int[4];  MyArray= new int[3][] {new int[] {1, 2, 3}, new int[] {1},new int[] {1, 2}};
String Manipulation
String Builder
Array List
Queue
Functions static  Void <  functionName  >  ( ) {    ...  }  static  <  returnType  >     <  functionName  >  ( )  {    ...    return  <  returnValue  >  }
Value Parameters
 Reference Parameters
 Out Parameters
Main Function  static void Main( ) static void Main(string[] args) static int Main() static StringMain(string[] args)
Struct Function
 Overloading Functions   create multiple functions with the same name, but each  working with different parameter types
Generic
 Delegates  A delegate  is a type that enables  you to store references to functions.
 try   . . .   catch . . . finally  try    {        //the code that might has exception    }    catch    {        //exception handling block     }   finally   {        //this block is executed either there            is exceptions or not   }
Classes & Objects
Constructors
This
Access Modifier -Public     Members are accessible from any code. -Private   Members are accessible only from code that is part of the class (the default if no keyword is used).   -Protected   Members are accessible only from code that is part of either the class or a derived class. -Internal    Members are accessible only from code within the project (assembly) where they are defined.   -Protected Internal   These are only accessible from code - derived classes within the project (more accurately, the assembly).
Class Definition
Encapsulation
Inheritance is -a
has -a
tire is  a car car has a tire has -a
Interface -like a class, but has no implementation. -Can be Internal or Public
Polymorphism
Future Sessions
Q & A Thanks

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Abstract class in java
Abstract class in javaAbstract class in java
Abstract class in java
 
javainterface
javainterfacejavainterface
javainterface
 
Object Oriented Principles
Object Oriented PrinciplesObject Oriented Principles
Object Oriented Principles
 
WHAT IS ABSTRACTION IN JAVA
WHAT IS ABSTRACTION IN JAVAWHAT IS ABSTRACTION IN JAVA
WHAT IS ABSTRACTION IN JAVA
 
What are Abstract Classes in Java | Edureka
What are Abstract Classes in Java | EdurekaWhat are Abstract Classes in Java | Edureka
What are Abstract Classes in Java | Edureka
 
Oops presentation java
Oops presentation javaOops presentation java
Oops presentation java
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Java Programming - Abstract Class and Interface
Java Programming - Abstract Class and InterfaceJava Programming - Abstract Class and Interface
Java Programming - Abstract Class and Interface
 
Abstract class and interface
Abstract class and interfaceAbstract class and interface
Abstract class and interface
 
CPP14 - Encapsulation
CPP14 - EncapsulationCPP14 - Encapsulation
CPP14 - Encapsulation
 
Ashish oot
Ashish ootAshish oot
Ashish oot
 
Abstract class and Interface
Abstract class and InterfaceAbstract class and Interface
Abstract class and Interface
 
General OOP Concepts
General OOP ConceptsGeneral OOP Concepts
General OOP Concepts
 
Object Oriented Concepts in Real Projects
Object Oriented Concepts in Real ProjectsObject Oriented Concepts in Real Projects
Object Oriented Concepts in Real Projects
 
Bca5020 visual programming
Bca5020  visual programmingBca5020  visual programming
Bca5020 visual programming
 
Bca5020 visual programming
Bca5020  visual programmingBca5020  visual programming
Bca5020 visual programming
 
Interface in java By Dheeraj Kumar Singh
Interface in java By Dheeraj Kumar SinghInterface in java By Dheeraj Kumar Singh
Interface in java By Dheeraj Kumar Singh
 
Abstraction and Encapsulation
Abstraction and EncapsulationAbstraction and Encapsulation
Abstraction and Encapsulation
 
2CPP09 - Encapsulation
2CPP09 - Encapsulation2CPP09 - Encapsulation
2CPP09 - Encapsulation
 
Polymorphism in java
Polymorphism in javaPolymorphism in java
Polymorphism in java
 

Similar a OOP in C#

INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptxINTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
DeepasCSE
 
Intro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technologyIntro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technology
worldchannel
 
C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01
Zafor Iqbal
 

Similar a OOP in C# (20)

Object oriented concepts
Object oriented conceptsObject oriented concepts
Object oriented concepts
 
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptxINTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
 
Introduction of Object Oriented Programming Language using Java. .pptx
Introduction of Object Oriented Programming Language using Java. .pptxIntroduction of Object Oriented Programming Language using Java. .pptx
Introduction of Object Oriented Programming Language using Java. .pptx
 
Arrays in java.pptx
Arrays in java.pptxArrays in java.pptx
Arrays in java.pptx
 
Object Oriented Programming - 5.1. Array
Object Oriented Programming - 5.1. ArrayObject Oriented Programming - 5.1. Array
Object Oriented Programming - 5.1. Array
 
Intro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technologyIntro to C# - part 2.pptx emerging technology
Intro to C# - part 2.pptx emerging technology
 
Cse java
Cse javaCse java
Cse java
 
Computer programming 2 Lesson 13
Computer programming 2  Lesson 13Computer programming 2  Lesson 13
Computer programming 2 Lesson 13
 
03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots
 
03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots
 
Java part 2
Java part  2Java part  2
Java part 2
 
C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01
 
DSA 103 Object Oriented Programming :: Week 5
DSA 103 Object Oriented Programming :: Week 5DSA 103 Object Oriented Programming :: Week 5
DSA 103 Object Oriented Programming :: Week 5
 
ch06.ppt
ch06.pptch06.ppt
ch06.ppt
 
ch06.ppt
ch06.pptch06.ppt
ch06.ppt
 
ch06.ppt
ch06.pptch06.ppt
ch06.ppt
 
ch06.ppt
ch06.pptch06.ppt
ch06.ppt
 
array Details
array Detailsarray Details
array Details
 
Java Tutorial
Java TutorialJava Tutorial
Java Tutorial
 
Clean Code
Clean CodeClean Code
Clean Code
 

Más de DevMix (15)

Framework prototype
Framework prototypeFramework prototype
Framework prototype
 
Framework prototype
Framework prototypeFramework prototype
Framework prototype
 
Devmix algorithm
Devmix algorithmDevmix algorithm
Devmix algorithm
 
Select your career
Select your careerSelect your career
Select your career
 
Devmix algorithm
Devmix algorithmDevmix algorithm
Devmix algorithm
 
Framework prototype
Framework prototypeFramework prototype
Framework prototype
 
New in html5
New in html5New in html5
New in html5
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Intro To DataBase
Intro To DataBaseIntro To DataBase
Intro To DataBase
 
Intro to windows app
Intro to windows appIntro to windows app
Intro to windows app
 
Logos samples
Logos samplesLogos samples
Logos samples
 
C sharp fundamentals Part I
C sharp fundamentals Part IC sharp fundamentals Part I
C sharp fundamentals Part I
 
Python
PythonPython
Python
 
Making a presentation
Making a presentationMaking a presentation
Making a presentation
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 

Último

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 

OOP in C#

  • 3. Array a data structure that contains several variables of the same type. One Dimensional Array Type [ ] Array_Name = new int [arraySize]; Examples int[] myIntArray = {5, 9, 10, 2, 99}; int[] myIntArray = new int[5]; int[] myIntArray = new int[5] {5, 9, 10, 2, 99};
  • 4.
  • 5. Multidimensional Arrays -A two - dimensional array such as this is declared as follows: < baseType > [ , ] < name > Examples double[ , ] hillHeight = new double[3,4]; int[ , ] hillHeight = {{1, 2, 3, 4}, {2, 3, 4, 5}, {3, 4, 5, 6}};
  • 6.
  • 7. Arrays of Arrays int[][] MyArray; MyArray = {{1, 2, 3}, {1}, {1, 2}}; int[][] MyArray = {new int[] {1, 2, 3}, new int[] {1}, new int[]{1,2}}; MyArray = new int[2][]; MyArray[0] = new int[3]; MyArray[1] = new int[4]; MyArray= new int[3][] {new int[] {1, 2, 3}, new int[] {1},new int[] {1, 2}};
  • 8.
  • 12. Queue
  • 13.
  • 14. Functions static Void < functionName > ( ) { ... } static < returnType > < functionName > ( ) { ... return < returnValue > }
  • 15.
  • 16.
  • 17.
  • 21. Main Function static void Main( ) static void Main(string[] args) static int Main() static StringMain(string[] args)
  • 22.
  • 23.
  • 25. Overloading Functions create multiple functions with the same name, but each working with different parameter types
  • 27. Delegates A delegate is a type that enables you to store references to functions.
  • 28.
  • 29. try . . . catch . . . finally try { //the code that might has exception } catch { //exception handling block } finally { //this block is executed either there is exceptions or not }
  • 30.
  • 33. This
  • 34. Access Modifier -Public Members are accessible from any code. -Private Members are accessible only from code that is part of the class (the default if no keyword is used). -Protected Members are accessible only from code that is part of either the class or a derived class. -Internal Members are accessible only from code within the project (assembly) where they are defined. -Protected Internal These are only accessible from code - derived classes within the project (more accurately, the assembly).
  • 36.
  • 37.
  • 38.
  • 40.
  • 43. tire is a car car has a tire has -a
  • 44.
  • 45.
  • 46. Interface -like a class, but has no implementation. -Can be Internal or Public
  • 47.
  • 48.
  • 49.
  • 52. Q & A Thanks