Reputation: 2045
I had created a DLL in .NET ,which includes several function.Now I am suing this DLL in another App
I want that whenever the client uses my DLL,somesort of comments must be shown that shows return type,Parameters etc.like this
i see people this using XML files.Is there any alternative way? Thanks in meekness
Upvotes: 5
Views: 3017
Reputation:
/// <summary>
/// This method does something.
/// </summary>
/// <param name="zain">Zain to be processed.</param>
/// <returns>True if it went okay, false otherwise.</returns>
Upvotes: 3
Reputation: 2668
As has been stated, you can add XML documentation at the beginning of each public member:
/// <summary>
/// This is the summary for your method.
/// </summary>
public void MyMethod()
{
/// your code here...
}
There are a host of tools to aide in the process. Check out GhostDoc for generating comments and Sandcastle for creating help files or web pages from it.
Upvotes: 1
Reputation: 1500635
You need to use XML documentation specified in comments before the member declaration.
/// <summary>Some stuff here</summary>
/// <remarks>Some remarks</remarks>
/// <param name="foo">The foo to gronk</param>
Then go into your project properties and enable building an XML file alongside your library in the "Build" tab. Distribute that along with your DLL, and Visual Studio will display your content.
Upvotes: 8
Reputation: 6409
Use /// at the start of the method declarations:
/// <summary>
/// This method does something.
/// </summary>
/// <param name="foo">Foo value to be processed.</param>
/// <returns>True if it went okay, false otherwise.</returns>
public bool DoSomething(int foo)
{
if (foo > 0)
return true;
else
return false;
}
Upvotes: 2