Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

5. C# Language, Part 1: Nouns > XML Magic at Work

XML Magic at Work

image

The standard tags defined for XML comments help structure your documentation, which can be surprisingly helpful when you’re working in a team. And because Visual Studio knows about the tags, it will prompt you for the documentation you should include, and use that documentation itself. Let’s try it:

1 In the chapter Project, select the line containing the ToDo comment, and type three slashes. Visual Studio will add an XML comment stub:

image

2 Add a description of the code to the line between the <summary> and </summary> tags:

/// <summary>
/// This is the code that runs when the button is clicked
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, RoutedEventArgs e)
...


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint