Solved

How to get type and/or member descriptions through reflection

Posted on 2009-03-28
3
412 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows shortcut location resolution on double click open 4 53
Visual Studio hangs on running project 6 61
Data organization issue 7 37
Securing WEBAPI on Azure 2 27
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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…

733 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