dynamically decorating objects in c#

Posted by Oren Mazor on Stack Overflow See other posts from Stack Overflow or by Oren Mazor
Published on 2010-04-29T16:54:37Z Indexed on 2010/04/29 16:57 UTC
Read the original article Hit count: 249

Filed under:
|

is it possible to easily and dynamically decorate an object?

for example, lets say I have a List<PointF>. this list is actually a plot of the sine function. I'd like to go through these points and add a flag to each PointF of whether it's a peak or not.

but I don't want to create a new extended SpecialPointF or whatever, that has a boolean property.

judge me all you want for being lazy, but laziness is how awesome ideas are born (also bad ideas)

© Stack Overflow or respective owner

Related posts about c#

Related posts about decorator