Solved

How to get type and/or member descriptions through reflection

Posted on 2009-03-28
3
411 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

840 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