Content deleted Content added
Line 3:
==The problem==
Normally, in a situation where it is necessary to add more functionality to a class - for instance a new method - it would simply be a matter of modifying the class' [[source code]] and recompiling the binaries with these new changes to make this effect. However, in some cases, especially when it comes to classes that are built-in into the .NET-framework or reside in third-party [[.NET assembly|assemblies]], the programmer does not have access to the source code and is thus unable to change the behavior of the class directly.
# The first option is to inherit the class and then add the functionality.
# The second option is to make a new, separate class and add a static method that takes an object of the class type and returns a new object with the modification of choice.
|