? Add DescriptionAttribute to Methods

  • Thread starter Thread starter David Coleman
  • Start date Start date
D

David Coleman

Hi All,

Can anyone tell me how to add the equivalent of DescriptionAttribute for
Properties to a public class Method and its passed parameters so it is
displayed through intellisense. Have found many references to the fact that
it can be done but can up to now find no example of how.

Help would be much appreciated. Thanks in advance.

David.
 
Kalpesh Shah said:
Use XML Comments in your code, above your method name

/// <summary>MyMethod is a method in the MyClass class.</summary>
/// <param name='v1'>Used to indicate value 1.</param>
/// <param name='v2'>Used to indicate value 2.</param>

in above case v1 & v2, is the name of the parameter in the method. So, replace v1 & v2 with the name
of the method parameters, that you have defined

HTH
Kalpesh

And in addition to this, you have to set a project property:
- project properties
- configuration properties | build
- set "XML documentation file"
(we use the same directory as the "output path", filename = project name +
".xml")

and then do a "rebuild" of the project/solution to update the xml-doc

Hans Kesting
 
Use XML Comments in your code, above your method name

/// <summary>MyMethod is a method in the MyClass class.</summary>
/// <param name='v1'>Used to indicate value 1.</param>
/// <param name='v2'>Used to indicate value 2.</param>

in above case v1 & v2, is the name of the parameter in the method. So, replace v1 & v2 with the name
of the method parameters, that you have defined

HTH
Kalpesh
 
Use XML Comments in your code, above your method name

/// <summary>MyMethod is a method in the MyClass class.</summary>
/// <param name='v1'>Used to indicate value 1.</param>
/// <param name='v2'>Used to indicate value 2.</param>

in above case v1 & v2, is the name of the parameter in the method. So, replace v1 & v2 with the name
of the method parameters, that you have defined

HTH
Kalpesh
 
Back
Top