Solved

How to get type and/or member descriptions through reflection

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linq Help 1 35
Remove greater than sign 3 42
C# Single Form 8 26
C#.NET and microsoft certification. 3 25
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
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.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

932 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

13 Experts available now in Live!

Get 1:1 Help Now