Take a look at the Decorator pattern or the Chain of Responsibility pattern
in the Gang of Four patterns.
http://www.dofactory.com/Patterns/Patterns.aspx
You will also need to look at one of the creational patterns so that you can
set up the structure correctly. (Perhaps Builder).
I suppose, if you are not going to provide the source code for the calling
side, you will want to provide the capability for the user to provide the
name of a class to call in the config file. Then your code can simply call
any classes that the user defines that meet your interface criteria and
which interact in the chosen pattern in the way you've defined.
See Assembly.Load
http://msdn.microsoft.com/library/de...sLoadTopic.asp
Hope this helps,
--- Nick
"C# Newbie" <C#
Ne****@discussions.microsoft.com> wrote in message
news:B8**********************************@microsof t.com...
hi,
I have a scenario where I would like to create a windows application and
using a class to return a message so that it can be displayed on the
windows application when a button is clicked.
After that is done, I would compile and package the windows application
and class for customer.
WIthout have to provide the source code of the windows application and
class file, how can the customer easily create a new class that implement the
compiled class to add more features such as displaying another message
when the button on the windows application is clicked? The previous message
that implemented in the compiled class should also be displayed and should not
be overrided.
How would this be implemented? Appreciate if this can be explained in
simple code.
THanks,
C# Newbie