Changing attributes at runtime

  • Thread starter Thread starter John Allen
  • Start date Start date
J

John Allen

I need to change the "Browsable" attribute for one of my class' properties
at runtime (from "true" to "false"). The only way I can see how to do it is
via "ICustomTypeDescriptor.GetProperties()" which means implementing the
latter interface on my class, creating a customized "PropertyDescriptor",
etc. Basically a lot of work for something so simple. Is there an easier way
to do this. Thanks.
 
John,

I found on the internet a very neat piece of work - called Property
Reflector, that I normally use - for quite some time - for these situations.
You can find the code at http://blog.guymahieu.com/?p=9.

I hope it helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top