Getting all the fields and properties of a custom attribute from a specific instance

Posted by Gbps on Stack Overflow See other posts from Stack Overflow or by Gbps
Published on 2010-05-23T03:00:14Z Indexed on 2010/05/23 3:20 UTC
Read the original article Hit count: 289

Filed under:
|

I have a custom attribute PackerAttrib which takes no data, simply marking a field or property, which will be used to mark a property or field of a class inherited from Panel in order to serialize it later on. How would I take an instance of any object derived from Panel and get a Directory<string s, object o> where s is the name of the field or property and o is the current value of said field or property from the instance.

Thank you, don't be afraid to ask me to clarify!

© Stack Overflow or respective owner

Related posts about c#

Related posts about custom-attributes