Title: Extending existing classes with "class helpers"
Question: Often you find a product you want to use in your application and in .NET this will be more often so. However, alle you can by is a run-time assembly for use in your project, yet, not the source code. The product would be perfect, if the classes would provide just two or three more methods. Well, with Delphi 8 for MS.NET you have a tool in your hands, that will help you to accomplish just this: extending an existing (even sealed) class.
Answer:
The theory
.NET gives us programmers a big set of new tools that provide easier programming possibilities than available to ever before. Learning from the problems of JAVA (Suns as well as their own version) they createt a framework that let's us programmers access basic system functionalities easily.
For one, the Microsoft XML DOM objects are an essential part of the framework and available for all application. In this article I will show you how to extend exactly these objects and provide new functions for easy access. Please keep in mind, I am using the XML Objects for two reasons:
We do not have the source code to the MS XML DOM, yet we can extend it
It is easy to use and does not expect you to have a broad knowledge of any other 3rd party product
NOTE ONE:
Though I have selected Delphi 7 as version, this article works only with Delphi.NET. It will not work with the Delphi.NET Preview. Even after two weeks first mentioning to Delphi 3000 that they should add Delphi 8 to the select box, that hasn't happened so far.