SlideShare a Scribd company logo
Maha EL-basuonyOOP
 Agenda
 Arraya data structure that contains several variables of the same type. One Dimensional ArrayType  [ ] Array_Name = new int [arraySize]; Examplesint[] myIntArray = {5, 9, 10, 2, 99}; int[] myIntArray = new int[5]; int[] myIntArray = new int[5] {5, 9, 10, 2, 99};
OOP in C#
 Multidimensional Arrays  -A two - dimensional array such as this is declared as follows:  <  baseType  > [ , ]  <  name  >  Examplesdouble[ , ] hillHeight = new double[3,4]; int[ , ] hillHeight = {{1, 2, 3, 4}, {2, 3, 4, 5}, {3, 4, 5, 6}};
OOP in C#
 Arrays of Arraysint[][] 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}};
OOP in C#
String Manipulation
String Builder
Array List
Queue
OOP in C#
Functionsstatic  Void <  functionName  >  ( ){   ... } static  <  returnType  >     <  functionName  >  ( ) {   ...   return  <  returnValue  > }
OOP in C#
OOP in C#
OOP in C#
Value Parameters
 Reference Parameters
 Out Parameters
Main Function static void Main( )static void Main(string[] args)static int Main()static StringMain(string[] args)
OOP in C#
OOP in C#
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.
OOP in C#
 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  }
OOP in C#
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
OOP in C#
OOP in C#
OOP in C#
Encapsulation
OOP in C#
Inheritanceis -a
has -a
tire is  a carcar has a tirehas -a
OOP in C#
OOP in C#
Interface-like a class, but has no implementation.-Can be Internal or Public
OOP in C#
OOP in C#
OOP in C#
Polymorphism
Future Sessions
Q & AThanks

More Related Content

PPTX
Unusual C# - OOP
PDF
Total oop in c# dot net
PPSX
C#, OOP introduction and examples
PPTX
Lecture 18
PPTX
Abstraction in java [abstract classes and Interfaces
PPTX
Abstract Class In Java | Java Abstract Class Tutorial | Java Tutorial For Beg...
PDF
Java programming -Object-Oriented Thinking- Inheritance
PPT
Oops And C++ Fundamentals
Unusual C# - OOP
Total oop in c# dot net
C#, OOP introduction and examples
Lecture 18
Abstraction in java [abstract classes and Interfaces
Abstract Class In Java | Java Abstract Class Tutorial | Java Tutorial For Beg...
Java programming -Object-Oriented Thinking- Inheritance
Oops And C++ Fundamentals

What's hot (20)

PPT
Abstract class in java
PDF
javainterface
PDF
Object Oriented Principles
PPTX
WHAT IS ABSTRACTION IN JAVA
PDF
What are Abstract Classes in Java | Edureka
PDF
Oops presentation java
PPT
Lecture 2
PPT
Java Programming - Abstract Class and Interface
PPTX
Abstract class and interface
PPTX
CPP14 - Encapsulation
PPT
Ashish oot
PPTX
Abstract class and Interface
PPT
General OOP Concepts
PDF
Object Oriented Concepts in Real Projects
DOCX
Bca5020 visual programming
DOCX
Bca5020 visual programming
PPT
Interface in java By Dheeraj Kumar Singh
PPTX
Abstraction and Encapsulation
PPTX
2CPP09 - Encapsulation
PPTX
Polymorphism in java
Abstract class in java
javainterface
Object Oriented Principles
WHAT IS ABSTRACTION IN JAVA
What are Abstract Classes in Java | Edureka
Oops presentation java
Lecture 2
Java Programming - Abstract Class and Interface
Abstract class and interface
CPP14 - Encapsulation
Ashish oot
Abstract class and Interface
General OOP Concepts
Object Oriented Concepts in Real Projects
Bca5020 visual programming
Bca5020 visual programming
Interface in java By Dheeraj Kumar Singh
Abstraction and Encapsulation
2CPP09 - Encapsulation
Polymorphism in java
Ad

Similar to OOP in C# (20)

PDF
1204csharp
PPT
Whidbey old
PDF
Intake 38 3
PDF
C# quick ref (bruce 2016)
ODP
Ppt of c vs c#
PPTX
PPTX
Module 7 : Arrays
PPT
Csharp In Detail Part2
PPTX
Intro to C# - part 2.pptx emerging technology
PPS
Introduction to CSharp
PPT
Introduction to csharp
PPT
Introduction to-csharp-1229579367461426-1
PPT
Introduction to csharp
PPT
Introduction to csharp
PPT
Introduction To Csharp
PPTX
Net framework
PPTX
1204csharp
Whidbey old
Intake 38 3
C# quick ref (bruce 2016)
Ppt of c vs c#
Module 7 : Arrays
Csharp In Detail Part2
Intro to C# - part 2.pptx emerging technology
Introduction to CSharp
Introduction to csharp
Introduction to-csharp-1229579367461426-1
Introduction to csharp
Introduction to csharp
Introduction To Csharp
Net framework
Ad

More from DevMix (15)

PPTX
Framework prototype
PPTX
Framework prototype
PPTX
Devmix algorithm
PPTX
Select your career
PPTX
Devmix algorithm
PPTX
Framework prototype
PPT
New in html5
PPTX
Algorithms
PPTX
Intro To DataBase
PPTX
Intro to windows app
PPTX
Logos samples
PPTX
C sharp fundamentals Part I
PPT
Python
PPTX
Making a presentation
PPTX
Cloud Computing
Framework prototype
Framework prototype
Devmix algorithm
Select your career
Devmix algorithm
Framework prototype
New in html5
Algorithms
Intro To DataBase
Intro to windows app
Logos samples
C sharp fundamentals Part I
Python
Making a presentation
Cloud Computing

Recently uploaded (20)

PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
master seminar digital applications in india
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Trump Administration's workforce development strategy
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
Yogi Goddess Pres Conference Studio Updates
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
master seminar digital applications in india
Supply Chain Operations Speaking Notes -ICLT Program
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Trump Administration's workforce development strategy
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Computing-Curriculum for Schools in Ghana
2.FourierTransform-ShortQuestionswithAnswers.pdf
Cell Types and Its function , kingdom of life
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
History, Philosophy and sociology of education (1).pptx
Yogi Goddess Pres Conference Studio Updates
LDMMIA Reiki Yoga Finals Review Spring Summer
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
What if we spent less time fighting change, and more time building what’s rig...
Chinmaya Tiranga quiz Grand Finale.pdf
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Complications of Minimal Access Surgery at WLH
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf

OOP in C#

  • 3. Arraya data structure that contains several variables of the same type. One Dimensional ArrayType [ ] Array_Name = new int [arraySize]; Examplesint[] myIntArray = {5, 9, 10, 2, 99}; int[] myIntArray = new int[5]; int[] myIntArray = new int[5] {5, 9, 10, 2, 99};
  • 5. Multidimensional Arrays -A two - dimensional array such as this is declared as follows: < baseType > [ , ] < name > Examplesdouble[ , ] hillHeight = new double[3,4]; int[ , ] hillHeight = {{1, 2, 3, 4}, {2, 3, 4, 5}, {3, 4, 5, 6}};
  • 7. Arrays of Arraysint[][] 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}};
  • 12. Queue
  • 14. Functionsstatic Void < functionName > ( ){ ... } static < returnType > < functionName > ( ) { ... return < returnValue > }
  • 21. Main Function static void Main( )static void Main(string[] args)static int Main()static StringMain(string[] args)
  • 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.
  • 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 }
  • 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).
  • 43. tire is a carcar has a tirehas -a
  • 46. Interface-like a class, but has no implementation.-Can be Internal or Public