SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
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
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
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
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard 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