Skip to Main Content
C# 2008 Programmer's Reference
book

C# 2008 Programmer's Reference

by Wei-Meng Lee
November 2008
Intermediate to advanced content levelIntermediate to advanced
838 pages
16h 26m
English
Wrox
Content preview from C# 2008 Programmer's Reference

Appendix C. Generating Documentation for Your C# Applications

Documenting your code is probably the last thing you would do in your typical project cycle. While the importance of writing documentation has been stressed umpteen times, developers usually devote the best part of the project cycle to building new features, and then finally do a mediocre job at the end writing the dreaded documentation. Borrowing the popular "clean as you go" phrase found in a lot of kitchens, the best way to churn out top-quality documentation for your project is to document as you go.

In Visual Studio 2008, you can document your code using the XML code documentation feature. This appendix shows you how to generate MSDN-style documentation for your project using Visual Studio 2008 and a third-party documentation generation tool — Sandcastle.

Inline Documentation using XML

To see how XML documentation works, create a new class library project in Visual Studio 2008 as shown in Figure C-1. Name the project PointClass.

Figure C-1

Figure C.1. Figure C-1

Populate the default Class1.cs with the following class definition:

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PointClass { public class Point { //---static variable--- private static int count; //---properties--- public int x { get; set; } public int y { get; set; } //---constructors--- public Point() { count++; } public ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# 5.0 Programmer's Reference

C# 5.0 Programmer's Reference

Rod Stephens
Learning C# 2005, 2nd Edition

Learning C# 2005, 2nd Edition

Jesse Liberty, Brian MacDonald
A Programmer's Guide to C# 5.0, 4th Edition

A Programmer's Guide to C# 5.0, 4th Edition

Eric Gunnerson, Nick Wienholt
Beginning C# 6.0 Programming with Visual Studio 2015

Beginning C# 6.0 Programming with Visual Studio 2015

Benjamin Perkins, Jacob Vibe Hammer, Jon D. Reid

Publisher Resources

ISBN: 9780470285817Purchase book