Hi, I'm fairly new to attributes programming and don't exactly know its limitations.
What I'm hoping to acheive isto have a certain piece of code executed when a field is being assigned toby simply decorating it. Now I understand I can do this by simply usingthe setter on a property but that's not what I want. Imagine a struct or class where I could define an OnChange and have it triggerred onlycertain valuesare changed.
I'm not sure if this is possible, my understanding is that attributes are only meant to be read through reflection and then acted upon, is this true?
I know other attributes run code as you call them. For example decorating a method signature with DllImportAttribute will actually invoke code to load and execute the unmanagedapi when you make a call to the decorated method.
Any ideas?
Thanks in advance
Nic