How to add comments to my method parameters?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have noticed that when I call certain methods, such as DataSet.ReadXml,
they have not only the parameter list but also a description of what needs to
be passed in. To use the example above, opening the brace tells you that the
first parameter expected is string fileName, and the description is

fileName: the filename(including the path) from which to read.

How can I add such descriptions when I create methods in my library of
classes? Descriptions for methods and classes are no problem, it's just the
parameter list I need.

Thank you in advance for your replies.
 
Actuallu, it might not be.

I have added this code to a class:

/// <summary>
/// Read an xml file and return a DataSet containing all of the data
/// </summary>
/// <param name="path">The path to the XML file to read</param>
/// <returns>Returns a DataSet containing the tables listed in the
/// XML file</returns>
/// <remarks>Read an xml file and return a DataSet containing all of the
data</remarks>
public DataSet GetDataSetFromXml(string path)
{
ds = new DataSet();
ds.ReadXml(path);

return ds;
}

But when I call this method, Intellisense simply tells me that it takes a
string and has 1 overload.

I have rebuilt theclass library this class resides in, and updated the
reference to this dll, but still get no more information than the default.
 
Check that your XML documentation file is in the same directory as the
compiled assembly, and that it has the same name as the assembly, but
with a .xml extension.
 
Back
Top