0% found this document useful (0 votes)
34 views26 pages

Edp Chap 3part 2

Uploaded by

Dinksraw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views26 pages

Edp Chap 3part 2

Uploaded by

Dinksraw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 26

Event Driven Programming

Chapter 3: Object-Oriented
Fundamentals in C#.NET
Part_2

DUCoE, By: Ins. Solomon S.


Outlines
Language Fundamentals
o Variables and Data Types
o Control Flow
o Methods and Their Types
o Events
Classes and Objects
Inheritance and Overloading Implementation
Classes versus Components
Classes and Objects
…Classes and Objects
…Classes and Objects
…Classes and Objects
C# Class Members
…C# Class Members
…C# Class Members
…C# Class Members
Object Methods
C# Constructors
…C# Constructors
C# Method Overloading
…C# Method Overloading
…C# Method Overloading
C# Inheritance
…C# Inheritance
…C# Inheritance

Why And When To Use "Inheritance"?


- It is useful for code reusability:
• reuse fields and methods of an existing class when you create a
new class.
C# Polymorphism

Inheritance lets us inherit fields and methods from another class.

Polymorphism uses those methods to perform different tasks. This allows us to perform a
single action in different ways.

For example, think of a base class called Animal that has a method called
animalSound().
Derived classes of Animals could be Pigs, Cats, Dogs - And they also have
their own implementation of an animal sound (the pig oinks, and the cat
…C# Polymorphism
…C# Polymorphism
…C# Polymorphism
…C# Polymorphism
Reading Assignment

 Classes versus Components in C#


End of Part_2

You might also like