Game Development Reference
In-Depth Information
Table 11.2 List of Standard Tag Attributes
Tag Attribute
This attribute can be attached to any tag to provide a reference to a code
element. It is important to note that the compiler will verify that this code
element exists, and will issue a warning if the verification fails. The compiler
also respects any using statements when looking for a type described in
this attribute.
This attribute describes the name of a parameter in a <param> or
<paramref> tag.
Commenting Example
In order to illustrate the entire process of documenting source code, we will define
and discuss a simple example in a linear fashion.
We will start by defining a simple method called SaveApplicationSettings that will
accept a string parameter and not return anything. This method won't do anything
in terms of functionality, but it will show how to properly document a code con-
/// <summary>
/// Saves the application settings to a text file named by
/// the fileName property, and saved in isolated storage.
/// </summary>
/// <param name=”fileName”>
/// The name of the file to store the application settings in.
/// </param>
/// <example>
/// The following code shows how to properly call this method.
/// <code>
/// SaveApplicationSettings(“MyApplication.xml”);
/// </code>
/// </example>
/// <permission cref=”System.Security.PermissionSet”>
/// This method can be accessed by everyone
/// </permission>
public void SaveApplicationSettings(string fileName)
MessageBox.Show(“This is where the settings would actually be saved”);
Search Nedrilad ::

Custom Search