attributes to display intellisense

J

Jeremy Chapman

Here is an example of a method I've written. I used xml comments, and the
Description attribute in the hopes that I would be able to display popup
info in the ide. No luck so far. Can anyone shed some light on this?

/// <summary>

/// Returns a list of asset tags for a device name (Location).

/// Data Repository Information:

/// SELECT * FROM kel_mm_eqp_main WHERE location = strDeviceName

/// </summary>

/// <param name="strDeviceName">Device Name (Location)</param>

/// <returns>DataSet containing asset tags</returns>

[Description("Returns a list of asset tags for a device name (Location).")]

public System.Data.DataSet GetAssetTags(string strDeviceName)

{

return CallListSQL("SELECT id FROM kel_mm_eqp_main WHERE location = " +
strDeviceName);

}
 
J

Jim

That looks like it should work... I'm about done for the
day or I'd key it in real quick and give it a go... Did
you build the project and then include it as a reference
in your test app? I think it needs to be build and most
definitely a reference before the IDE will recognize it to
give you tooltips / dropdowns.

JIM
-----Original Message-----
Here is an example of a method I've written. I used xml comments, and the
Description attribute in the hopes that I would be able to display popup
info in the ide. No luck so far. Can anyone shed some light on this?

/// <summary>

/// Returns a list of asset tags for a device name (Location).

/// Data Repository Information:

/// SELECT * FROM kel_mm_eqp_main WHERE location = strDeviceName

/// </summary>

/// <param name="strDeviceName">Device Name (Location)
/// <returns>DataSet containing asset tags</returns>

[Description("Returns a list of asset tags for a device name (Location).")]

public System.Data.DataSet GetAssetTags(string strDeviceName)

{

return CallListSQL("SELECT id FROM kel_mm_eqp_main WHERE location = " +
strDeviceName);

}


.
 
P

Peter Rilling

First you need to tell your project where to store the comments. These are
stored in XML files, and if you open the properties for your project, one of
the settings allows you to specify the name that it will be saved as. This
name should be the same as your assembly except it would have a ".xml" at
the end. If your assembly was named foo.dll, then your comment file would
be foo.xml.

Next, your comment file has to be in the same directory as your assembly for
VS.NET to locate it. This can often be tricky when dealing with multiple
projects as the IDE shadow copies all referenced assemblies but neglects the
XML files. Therefore, you could be building the comment files each compile
but it is really up to you to ensure the file gets moved to the directory
where your application resides.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top