Friday, January 16, 2009

Adding xml comments

Having class like this:


using System;
using System.Collections.Generic;
using System.Text;

namespace ClassLibrary1
{
public class Class1
{
public string Method(int number, string name, DateTime date)
{
}
}
}

How easy is to put xml comments?

Very easy, just type /// before the class,method, property ...

And you will got this:


namespace ClassLibrary1
{
/// <summary>
///
/// </summary>
public class Class1
{
/// <summary>
///
/// </summary>
/// <param name="number"></param>
/// <param name="name"></param>
/// <param name="date"></param>
/// <returns></returns>
public string Method(int number, string name, DateTime date)
{
}
}
}

No comments:

Post a Comment