Presentation is loading. Please wait.

Presentation is loading. Please wait.

ITF11006.NET Inheritance. Classes and Inheritance Constructors and Inheritance Modifiers Interfaces Operators.

Similar presentations


Presentation on theme: "ITF11006.NET Inheritance. Classes and Inheritance Constructors and Inheritance Modifiers Interfaces Operators."— Presentation transcript:

1 ITF11006.NET Inheritance

2 Classes and Inheritance Constructors and Inheritance Modifiers Interfaces Operators

3 Class Single Implementation Inheritance Multiple Interface Inheritance Method Overloading – Polymorphism Method Overriding – Polymorphism Calling methods (base) Abstract Classes and Functions Sealed Classes and Methods

4 Constructors and Inheritance Constructors – Default constructor – May be overloaded – Access Modifiers – Static – Constructor hierarchy (base / this)

5 Access Modifiers ModifierMeaning publicAccess is not restricted. protectedAccess is limited to the containing class or types derived from the containing class. internalAccess is limited to the current assembly. protected internalAccess is limited to the current assembly or types derived from the containing class. privateAccess is limited to the containing type.

6 Other Modifiers ModifierMeaning newThe member hides an inherited member with the same signature. staticThe member is a class level member. virtualThe member can be overridden by a derived class. abstractA virtual member that defines the signature of the member, but doesn’t provide an implementation. overrideThe member overrides an inherited virtual or abstract member. sealedFor classes, the class cannot be inherited. For members, the member cannot be overridden in any derived classes. externThe member is implemented externally.

7 Interfaces


Download ppt "ITF11006.NET Inheritance. Classes and Inheritance Constructors and Inheritance Modifiers Interfaces Operators."

Similar presentations


Ads by Google