|
-
Jan 5th, 2006, 07:23 AM
#1
[RESOLVED] Descriptions of Functions in Intellisense
I know to use [Description()] to create a description for a property. That shows up in the Properties in the Designer.
How do I create a description of a function? i.e. when you start to type in my function, it'll say what it does and it'll also tell you what each value passed to the function means.
I used to know this but I can't remember.
Running VS2003, btw.
-
Jan 5th, 2006, 07:36 AM
#2
Re: Descriptions of Functions in Intellisense
Code:
/// <summary>
/// This is the description of my function
/// <param name="myString">The string you want to do something with.</param>
/// </summary>
private void myFunction(string myString) {
MessageBox.Show(myString);
Is that what you're after?
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jan 5th, 2006, 02:16 PM
#3
Re: Descriptions of Functions in Intellisense
Well, I tried building my DLL. Then referencing it in a test project and it still doesn't show the summary in the intellisense.
Is there something I'm missing?
Like if I type the following
System.Math.Round
It shows me the following text:
Returns the number with the specified precision nearest the specified value
When I type System.Math.Round(, it'll start showing me a little description of each variable I need to pass to the Round() method.
That is what I want my methods to do, however; even with the summary they still do not do it.
-
Jan 5th, 2006, 05:47 PM
#4
Re: Descriptions of Functions in Intellisense
All I did was add the XML comments, as crptblade suggested:
Last edited by jmcilhinney; Feb 9th, 2008 at 03:47 AM.
-
Jan 5th, 2006, 05:48 PM
#5
Re: Descriptions of Functions in Intellisense
Oops, forgot the important part. Go to your project's properties, under Configuration Properties->Build, and in the XML Documentation File field, put in <Assembly Name>.xml
Rebuild your project and the xml file should be generated. Then the project you reference your DLL from should pick up the documentation, after you reopen the project of course.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jan 5th, 2006, 06:41 PM
#6
Re: Descriptions of Functions in Intellisense
Hmmm... mustn't ever have tried to use XML comments from a C# DLL before as I didn't know that myself. Obviously my previous test didn't take into account the seperate projects. Sorry for the red herring.
-
Jan 5th, 2006, 07:01 PM
#7
Re: Descriptions of Functions in Intellisense
 Originally Posted by crptcblade
Oops, forgot the important part. Go to your project's properties, under Configuration Properties->Build, and in the XML Documentation File field, put in <Assembly Name>.xml
Rebuild your project and the xml file should be generated. Then the project you reference your DLL from should pick up the documentation, after you reopen the project of course.
Thanks. Works perfectly!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|