Is it possible to programatically get the <summary> text of a class,property or method?

B

Benny Raymond

I'm currently working on giving my plugins space in my settings.xml
file, actually, that's now working - however I would like to display
each of the plugin's "setting" property summaries in the details section
of the datagrid that I am using to update their values. I was wondering
if there was a way to access this information. (hopefully that's not too
confusing).

I assume there is because I can load up a dll file in my app called
let's say plugin.dll and once I call it I can do things like
plugintype.foo and get a description in some popup text of what that
property, method, etc's summary is.

Thanks in advance,
Benny
 
B

Benny Raymond

I just noticed tg.foobar's message about property grid... is this what I
should be using?
[CategoryAttribute("Dates"),
DescriptionAttribute("Actual date mail was received by customer")]
 
C

Christoph Nahr

I just noticed tg.foobar's message about property grid... is this what I
should be using?
[CategoryAttribute("Dates"),
DescriptionAttribute("Actual date mail was received by customer")]

Yes, attributes are a better way to do this. Attributes are embedded
in the compiled DLL file so you can get them via reflection.

XML comments are not embedded in the DLL file. They are kept in a
separate XML file, and that's the file that Visual Studio is analyzing
to pop up those helpful messages.
 
T

Truong Hong Thi

Then you should parse the XML file and get such info.
VS.NET also does it that way. If you add reference to a library (say,
log4net.dll) you won't get tooltip until you put its xml comments file
in the same folder.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top