Search code examples
c#.net-4.0system.reflection

Getting a type's member description


I am writing a program which utilises the System.Reflection namespace of the Microsoft .NET 4.0 Framework, however there is a piece of information that I require which I cannot find or does not exist in the namespace.

In Visual Studio when you access a type's members the IntelliSense provides a brief description of the member at hand. For example, the System.Object.Equals method has the description: "Determines whether the specified System.Object is equal to the current System.Object."

Does there exist any methods/properties in the framework which allow me to get the description of a type in an assembly?

Thanks


Solution

  • That information is not inside the assembly, but is obtained from the matching .xml file - i.e. foo.dll can optionally have foo.dll.xml. You would need to query the data from there, but note that in many cases this data is not deployed with 3rd-party dlls.