i want to ask u how we add behaviours to uses decorator pattern,actually its very much about on internet but not a single example i found thath i understand clearly ,
i want i make a form in which i take input from user like his name and age and then at runtime i add behaviour like the person also do networking ,programin ,graphic designing etc through radio button or check boxes .is that thing will be a decorator example ??
sunilPosted Dec 27, 2007, 7:14 AM
The dofactory site is not an easily understandable one for a newbie (even for experts too !!).
Here is a very good explanation for the same.
http://www.codeproject.com/dotnet/PatternsIntro_Decorator.asp
AlanPosted Dec 20, 2007, 6:58 AM
There's a reasonably clear explanation and C# example code for the 'decorator' pattern here:
http://www.dofactory.com/Patterns/PatternDecorator.aspx
As you know, this pattern enables you to add extra functionality to an object dynamically i.e. at runtime.