When I use any .NET methods, there is a little hint which explains the methods and their parameters.
How do I achieve the same behaviour for my own methods? Is there a Visual Studio feature which allows me to add these in?
the "feature" is called XML comments. Just type /// right before your methods and VS will generate some xml tags. These will be used to show the tooltip as well as parameter info aso.
/// <summary> /// this will be the tooltip /// </summary> /// <param name="args">args will be passed when starting this program</param> static void Main(string[] args) { }
Screenshot of my VS2010 when calling method add. As you can see, xml comments are shown.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With