How to write a method like string.Format with intellisense support

后端 未结 2 1164
青春惊慌失措
青春惊慌失措 2021-01-12 08:06

Consider a method to write with a format parameter like string.Format\'s frist parameter. As you know the Intellisense is aware of first parameter\

2条回答
  •  有刺的猬
    2021-01-12 08:57

    The compiler doesn't issue a warning for String.Format with wrong number of parameters. However, if you want intellisense support, precede your method with /// and it will create a template for documenting the method. Fill in the documentation and it will appear in the intellisense when you use the method.

提交回复
热议问题