How to display static (shared) object's properties via a Forms PropertyGrid?

Posted by Paul Sasik on Stack Overflow See other posts from Stack Overflow or by Paul Sasik
Published on 2010-04-12T14:09:08Z Indexed on 2010/04/12 14:13 UTC
Read the original article Hit count: 336

Filed under:
|
|
|
|

I would like to display static (shared) objects at runtime in a PropertyGrid but if I try to set the selected object property of the grid like this:

_propertyGrid.SelectedObject = System.Windows.Forms.Application

I get this compilation error:

'Application' is a type and cannot be used as an expression.

Is there a way to display a static (shared) object or the object's properties in the PropertyGrid?

© Stack Overflow or respective owner

Related posts about winforms

Related posts about c#