How do you get .Net To Intelisence comments

  • Thread starter Thread starter Phill
  • Start date Start date
P

Phill

In Visual C++ I Can do This

//-------------------
//Name: myMethod()
//Desc: This Method Does Somthing Cool And Returns True Or False
//-------------------
bool Obj::myMethod() {}

When I went to use this method and typed:
obj.m

The little intellisense window thing would show my method and the
commnet above it would show so I could see what the function did. So
far in C# I'm only getting the signature of the method. Which is nice
but I'd like to have a comment appear as well. Anyone know how to do
this?
 
Phill,

You should use the XML comments (look under the MSDN documentation for
XML documentation). When you use these, intellisense will pick up on these
and show them in the IDE.

Hope this helps.
 
Instead of using the usual double-slash comment form, enter three. The IDE
will magically transform your comment into a summary description which will
be shown in the tooltip as you described.

/// <summary>

/// This method does some stuff

/// </summary>

private void my_method()

{
 
Reg Rat said:
Instead of using the usual double-slash comment form, enter three. The IDE
will magically transform your comment into a summary description which will
be shown in the tooltip as you described.

And if you write the first line of the function first (with parameters and
return values defined), then the auto-document will also auto-generate
those.
 
Back
Top