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

后端 未结 12 1538
难免孤独
难免孤独 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 11:15

    In CSharp, If you create the method/function outline with it's Parms, then when you add the three forward slashes it will auto generate the summary and parms section.

    So I put in:

    public string myMethod(string sImput1, int iInput2)
    {
    }
    

    I then put the three /// before it and Visual Studio's gave me this:

    /// 
    /// 
    /// 
    /// 
    /// 
    /// 
    public string myMethod(string sImput1, int iInput2)
    {
    }
    

提交回复
热议问题