How to have comments in IntelliSense for function in Visual Studio?

后端 未结 12 1537
难免孤独
难免孤独 2020-12-04 10:42

In Visual Studio and C#, when using a built in function such as ToString(), IntelliSense shows a yellow box explaining what it does.

How can I ha

12条回答
  •  暖寄归人
    2020-12-04 10:59

    Define Methods like this and you will get the help you need.

        /// 
        /// Adds two numbers and returns the result
        /// 
        /// first number to add
        /// second number to 
        /// 
        private int Add(int first, int second)
        {
            return first + second;
        }
    

    Screenshot of the code usage

提交回复
热议问题