Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How would you implement inheritance using VB.NET/C#?
How would you implement inheritance using VB.NET/C#?
✍: Guest
When we set out to implement a class using inheritance, we must first start with an existing class from which we will derive our new subclass. This existing class, or base class, may be part of the .NET system class library framework, it may be part of some other application or .NET assembly, or we may create it as part of our existing application. Once we have a base class, we can then implement one or more subclasses based on that base class. Each of our subclasses will automatically have all of the methods, properties, and events of that base class ? including the implementation behind each method, property, and event. Our subclass can add new methods, properties, and events of its own - extending the original interface with new functionality. Additionally, a subclass can replace the methods and properties of the base class with its own new implementation - effectively overriding the original behavior and replacing it with new behaviors. Essentially inheritance is a way of merging functionality from an existing class into our new subclass. Inheritance also defines rules for how these methods, properties, and events can be merged.
2014-01-23, 2027👍, 0💬
Popular Posts:
Can Java object be locked down for exclusive use by a given thread? Yes. You can lock an object by p...
What does a well-written Object Oriented program look like? A well-written object oriented program e...
What does a special set of tags <?= and ?> do in a PHP script page? <?= express...
What Is the Data Pump Import Utility? - Oracle DBA FAQ - Loading and Exporting Data Oracle Data Pump...
How To Create Nested Tables? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells You can cr...