Last post Sep 21, 2007 12:54 PM by landshark
Sep 14, 2007 04:16 PM|landshark|LINK
I am not even sure this is possible, but I have noticed when I call native functions I get a list of parameters, the bold one being the current parameter. In addition to this, however, there is a hint that explains what the current parameter actually is.
What I am looking for is a way to do that in my own functions so that they are more user friendly to other developers using them.
Anyone have any ideas? I am very new to .net (two weeks), but I have been programming since before Turbo Pascal existed :-)
Sep 14, 2007 04:25 PM|jperry4|LINK
Add XML comments tags to your functions with ///
Sep 14, 2007 05:53 PM|landshark|LINK
Thank you for pointing out that feature, it is quite nice for documentation purposes, I will definitely use it for that :-)
I have not yet found a way to get that to pop up while writing code yet, though.
For instance, say I am writing a function:
public string ReplaceString(string strSource, strToFind, strToReplace)
When another developer calls this function, I would like him to see the parameter hints during design time, as he populates the parameters of the function. I would like this to happen no matter the VS language, be it c# or VB or whatever.
I didn't see anything in the XML link above that would allow for this functionality. Did I miss it, or is there a way to do this? Is there a setup that allows the XML file to be used inline in this way?
Sep 17, 2007 01:43 AM|Benson Yu - MSFT|LINK
From your description, I understand that you want to display the description of the current parameter when coding. For this scenario, please refer to the following code.
/// <param name="t1">this is the first parameter</param>
/// <param name="t2">this is the second parameter</param>
public void testmethod(int t1, string t2)
Sep 21, 2007 12:54 PM|landshark|LINK
Ahh, ok, something must have been out of sync because it is working fine now. I had filled all of that in after Mr. Perry had pointed me in the right direction, but they still weren't showing up even after a Build Solution. I ended up moving the code
repository and rebuilding, and now the tags show correctly.
Thanks for the help, guys!!