Link to home
Start Free TrialLog in
Avatar of bluelight1324
bluelight1324

asked on

How to get type and/or member descriptions through reflection

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?
Avatar of drypz
drypz
Flag of Philippines image

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

Avatar of bluelight1324
bluelight1324

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of bluelight1324
bluelight1324

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial