xml-comments

What are the virtues of using XML comments in .NET?

不打扰是莪最后的温柔 提交于 2019-12-03 20:48:53
问题 I can't understand the virtues of using XML comments. I know they can be converted into nice documentation external to the code, but the same can be achieved with the much more concise DOxygen syntax. In my opinion the XML comments are wrong, because: They obfuscate the comments and the code in general. (They are more difficult to read by humans). Less code can be viewed on a single screen, because "summary" and "/summary" take additional lines. (removed) What then could have been be the

Code documentation: How much is too much?

百般思念 提交于 2019-12-03 19:31:13
问题 How much code documentation in your .NET source is too much? Some background: I inherited a large codebase that I've talked about in some of the other questions I've posted here on SO. One of the "features" of this codebase is a God Class, a single static class with >3000 lines of code encompassing several dozen static methods. It's everything from Utilities.CalculateFYBasedOnMonth() to Utilities.GetSharePointUserInfo() to Utilities.IsUserIE6() . It's all good code that doesn't need to be

VS2010: Autogenerated files and XML documentation

早过忘川 提交于 2019-12-03 11:11:12
问题 This is really just re-asking this question asked about Visual Studio 2008. Does VS2010 offer any feature to get rid of the CS1591 compiler warning for auto-generated code? CS1591: Missing XML comment for publicly visible type or member To quote the question for VS2008: This is an annoyance more than a problem. My project contains a number of autogenerated files (using mgmtclassgen.exe). When I generate the XML documentation, my beautifully commented library is plagued by xml documentation

Commenting out XML

放肆的年华 提交于 2019-12-01 21:31:20
Consider this piece of XML: <ListBox x:Name="pictureBox" ItemsSource="{Binding}" MouseDoubleClick="item_DoubleClick" > Is there any way to comment out MouseDoubleClick="item_DoubleClick" ? This attempt fails: <ListBox x:Name="pictureBox" ItemsSource="{Binding}" <!-- MouseDoubleClick="item_DoubleClick"--> > You could just comment out the whole element, which would work, and underneath it put the modified version without that attribute. No it's not you'll have to remove it. You cannot have comments inside the declaration of an Element. It would not be possible for the parser to parse this XML at

using see cref with < > characters in XML Documentation? [duplicate]

。_饼干妹妹 提交于 2019-12-01 16:35:49
Possible Duplicate: How to reference generic classes and methods in xml documentation i have been using the see cref tag and it works great but now i need to include a generic list of string[] in the see cref but the documentation doesn't correctly render. /// <returns>A <see cref="List<string[]>" /> that ....... I presume its something to do with the < and > and maybe [] Is this allowed, is there a work around? /// <returns>A <see cref="List{T}" /> that</returns> 来源: https://stackoverflow.com/questions/4828075/using-see-cref-with-characters-in-xml-documentation

using see cref with < > characters in XML Documentation? [duplicate]

﹥>﹥吖頭↗ 提交于 2019-12-01 14:32:47
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: How to reference generic classes and methods in xml documentation i have been using the see cref tag and it works great but now i need to include a generic list of string[] in the see cref but the documentation doesn't correctly render. /// <returns>A <see cref="List<string[]>" /> that ....... I presume its something to do with the < and > and maybe [] Is this allowed, is there a work around? 回答1: /// <returns>A

How to make Visual Studio intellisense to show the remarks portion of XML comments?

浪子不回头ぞ 提交于 2019-12-01 14:07:05
问题 When typing code, I really like the intellisense feature of Visual Studio 2010 (Professional), especially that I am able to look up XML comments of types in use. (See Documentation from Microsoft). This works so far. However, the remarks section of XML code comments does not show up. I would consider this an extremely useful feature, since there is often useful information that can not get easily guessed from the summary. (Which is why we have a the remarks section, i guess) How to explore

How do I comment attributes inside an XML tag?

廉价感情. 提交于 2019-12-01 02:02:40
Is it possible to comment one or several attributes inside an XML tag? Something like /* */ from C. I have tried using <!-- --> , but it was unsuccessful. <element attribute1="value1" attribute2="value2" <!-- attribute3="value3" (commented value) --> > No, this isn't possible. Comments are not allowed in an XML open tag. Depending on your application, you might get away with "commenting out" the attributes by prefixing their names with "_", or you might not (if the XML is validated against a schema or all attributes are parsed). Because whitespace is allowed, and most editors support line

Visual Studio 2015 missing XML comments / documentation

我与影子孤独终老i 提交于 2019-11-30 22:53:45
问题 Is it me or are the XML comments missing for System.Linq in Visual Studio 2015 ? Because I can still find it on MSDN. But when typing, for example, this code: var list = new List<string>(); list.Select( IntelliSense doesn't provide the comments/documentation for any class/method/member/extension in the System.Linq namespace: Here is a preview when hitting ( Alt + ) F12 to go to definition for a random extension method on Enumerable : I think I didn't notice the docs in Visual Studio 2013

What are the virtues of using XML comments in .NET?

白昼怎懂夜的黑 提交于 2019-11-30 19:08:30
I can't understand the virtues of using XML comments. I know they can be converted into nice documentation external to the code, but the same can be achieved with the much more concise DOxygen syntax. In my opinion the XML comments are wrong, because: They obfuscate the comments and the code in general. (They are more difficult to read by humans). Less code can be viewed on a single screen, because "summary" and "/summary" take additional lines. (removed) What then could have been be the reasons, why XML was preferred in .NET rather that the simple DOxygen syntax? There is not really a correct