My own class & IntelliSense
-
Hi everyone! I'm trying to add some description to my classes' function that should appear next to IntelliSense list or inside the Quick Info box. :confused: Thanks! MP Maciej Pirog
-
Hi everyone! I'm trying to add some description to my classes' function that should appear next to IntelliSense list or inside the Quick Info box. :confused: Thanks! MP Maciej Pirog
In C# add XML Comments to your class. This will work.
-
In C# add XML Comments to your class. This will work.
Thank you very much! That's what I wanted!:rolleyes: MP Maciej Pirog
-
In C# add XML Comments to your class. This will work.
Hi rama, How can I add such intellisense for proprties/Methods in a User Defined Control ? I tried the Description Attribute. But it shows the description only in the properties window. How can I get it in the CodeWindow I want the descriptions about the Properties, Methods etc exposed from my Control to be visible also in the Code Window to the developer using the control (Just like it works for the Standard controls) Thanks Firoz
-
Hi rama, How can I add such intellisense for proprties/Methods in a User Defined Control ? I tried the Description Attribute. But it shows the description only in the properties window. How can I get it in the CodeWindow I want the descriptions about the Properties, Methods etc exposed from my Control to be visible also in the Code Window to the developer using the control (Just like it works for the Standard controls) Thanks Firoz
The summary tag will be what is shown when the name is chosen in Intellisense, the param tag tells it what to show for each parameter. Here's an example, copied from one project on my hard drive
/// <summary>
/// <para> Removes a specific File from the FileCollection.</para>
/// </summary>
/// <param name='value'>The File to remove from the FileCollection.</param>
/// <returns><para>None.</para></returns>
public void Remove(File value) {
List.Remove(value);
}The <para></para> tags are for formatting in utilities that take the XML documentation to spit out other documents, as far as I can tell it is ignored by Intellisense. It works the same for properties, except you don't use the <param> tags unless its an indexer. HTH, James
-
The summary tag will be what is shown when the name is chosen in Intellisense, the param tag tells it what to show for each parameter. Here's an example, copied from one project on my hard drive
/// <summary>
/// <para> Removes a specific File from the FileCollection.</para>
/// </summary>
/// <param name='value'>The File to remove from the FileCollection.</param>
/// <returns><para>None.</para></returns>
public void Remove(File value) {
List.Remove(value);
}The <para></para> tags are for formatting in utilities that take the XML documentation to spit out other documents, as far as I can tell it is ignored by Intellisense. It works the same for properties, except you don't use the <param> tags unless its an indexer. HTH, James
hi James, You are right. The intellisense shows the summary contents. But it doesnt seem to work in case of a User Control. When I make a Control (attaching the Summary tags for my custom properties and methods) and, then use that control in another application, the intellisense doesnt show the Summary Contents for the Properties or Methods. Does the information in the summary tag go into the final executable as Metadata ? Thanks Firoz
-
hi James, You are right. The intellisense shows the summary contents. But it doesnt seem to work in case of a User Control. When I make a Control (attaching the Summary tags for my custom properties and methods) and, then use that control in another application, the intellisense doesnt show the Summary Contents for the Properties or Methods. Does the information in the summary tag go into the final executable as Metadata ? Thanks Firoz
Ah, no it doesn't I forgot about that :-O You need to place the resulting .xml file in a certain directory. I believe you place it in the same directory as the assembly you are referencing, if you go into your Windows\Microsoft.NET\v1.0.3075\ directory you should see several .xml files there containing the information about the Framework. James
-
Hi everyone! I'm trying to add some description to my classes' function that should appear next to IntelliSense list or inside the Quick Info box. :confused: Thanks! MP Maciej Pirog
Does anyone know if you can do something similar within the same class? i.e. When calling a function from within the same class you can type ( or , and that tooltip pops up with the parameter list. Is there anyway to get that summary info to display in there? The tooltip might show " int MyFunction(int,int) ". I guess I'm looking to see something like " int MyFunction(int MaxValue,int MinValue) ". Thanks.