Click here to Skip to main content
13,453,774 members (44,217 online)
Click here to Skip to main content
Add your own
alternative version


25 bookmarked
Posted 28 Jan 2003

Attributes Inspector

, 28 Jan 2003
Rate this:
Please Sign up or sign in to vote.
Simple program to inspect custom attributes in assemblies

Sample Image - asseminspect.jpg

<!-- Add the rest of your HTML here -->


This is my first article at Codeproject and I'm not an english speaker; please accept my apologies for the mistakes that I might make.


I develop custom server controls in ASP.NET and C#, and one of my desperations is the integration of the controls in VS.NET designer surface. One of the problems is that I haven't found any simple application to see the custom attributes attached to types (ex: DesignerAttribute). I've searched documentation and I've written this simple application to do the job.

Application Description

The application is very simple, you can do the following tasks with it:

  • load an assembly: This shows at the bottom panel the custom attributes of the assembly, which can be recalled by double clicking at assembly name, and it shows public exported types contained in the assembly in the second panel.
  • To show custom attributes of a type, click on the type: It loads its properties , methods (not the inherited ones for brevity) and fields in the third panel and type custom attributes in the bottom panel.
  • To show custom attributes of a property , method or field, click on it.

The last version shows public and non public properties, and optionally by clicking the checkbox, show the values of the fields inside attributes.


This application shows a few interesting things, obviously all of these interesting things are explained in other Codeproject articles and various documents, but it is another example:

  • Load assemblies at runtime and discovering its types, methods and properties using reflection
  • Obtaining custom attributes an its values at runtime.
  • Using the richtextbox with simplicity witch has being a discover to me.

To Do

There are few improvements which I can figure out:

  • Make the attribute description to show the exact type where it is declared, now it flattens the type hierarchy causing the same attribute to be shown more that one time and possibly with different values.
  • Use a tree control to show the types hierarchy


  • 02/29/2003 - Initial release
  • 02/30/2003 - Added the possibility to show non public properties of attributes, and optionally (by clicking the checkbox) the possibility to show field values (public and non public) of attributes which are of different colour.
  • 02/30/2003 (II)- Added the possibility to show attributes for fields in types


I've reached my objective to find what Designers are attached to control types of System.Web and I'll follow my investigations, and I've another tool in my toolbox.

By the way, the documentation and public articles on modifying and personalizing the design time of controls are very poor or I haven't found a deep enough article, please if you have found one, tell me.

Thanks for this great site.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
Spain Spain
My first computer comes at 12 years old (a nice Commodore 64), 19 years ago, and from then the computers became an important part of my live.

I've obtained the Coputer Science Engineering diploma at Facultat d'Informàtica de Barcelona.

The path has been:
What's next?

You may also be interested in...

Comments and Discussions

Generaluseful Pin
.S.Rod.29-Jan-03 2:45
member.S.Rod.29-Jan-03 2:45 
GeneralRe: useful Pin
Hzi29-Jan-03 21:15
memberHzi29-Jan-03 21:15 
GeneralRe: useful Pin
.S.Rod.29-Jan-03 21:39
member.S.Rod.29-Jan-03 21:39 
GeneralRe: useful Pin
Hzi29-Jan-03 23:39
memberHzi29-Jan-03 23:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03-2016 | 2.8.180318.3 | Last Updated 29 Jan 2003
Article Copyright 2003 by Hzi
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid