Solved

How to get type and/or member descriptions through reflection

Posted on 2009-03-28
3
409 Views
Last Modified: 2012-05-06
Type information as well as member and parameter information can  all be accessed by reflection. The reflector program  displays all the above info as well as a textual description of a type as well as its members and also parameter descriptions. My question is how are the textual descriptions retrieved?
0
Comment
Question by:bluelight1324
  • 2
3 Comments
 
LVL 13

Expert Comment

by:drypz
ID: 24016552
Are you looking for FieldInfo in System.Reflection?


    Type yourObject = typeof(yourObject);
 

    foreach (FieldInfo fi in yourObject.GetFields())

    {

        //access fi properties/methods here

    }

Open in new window

0
 

Author Comment

by:bluelight1324
ID: 24020499
Thanks for your response. I am actually looking ffor a way to get the descriptions of the types  and parameters from an assembly. If  you look at the 'string' type in reflector the description says 'Represents text as a series of Unicode characters'. The Compare member of string type has a description which says 'Compares two specified String objects.'  Reflector is retrieving these descriptions from somewhere. My question is  from where?
0
 

Accepted Solution

by:
bluelight1324 earned 0 total points
ID: 24072078
Hello,
         I  was thinking that this information would be stored in the metadata of an assembly. I t is actually stored in the generated help documents the xml files.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now