[.net] Comments and attributes

Started by
1 comment, last by Jonas B 17 years, 11 months ago
Is there a way to access code comments such as /// <summary> /// Description of property /// </summary> in runtime? I could add a [Description()] attribute but then I'd have to maintain two instances of the same text.
Advertisement
No comments are not preserved in the .Net meta data.

If they are XML comments they are pushed out to a separate xml file as part of the build process and that xml file is what the intelli sense picks up. See http://dotnet.mvps.org/dotnet/faqs/?id=tooltipsxmldocumentation〈=en
ZMan
Too bad - thanks Z. Maybe I'll look into how to add a build step that can copy comments into Descriptions automatically, should be doable.

This topic is closed to new replies.

Advertisement