Are there attributes in C# for affecting how Intellisense displays class members?

前端 未结 3 713
萌比男神i
萌比男神i 2021-01-14 09:16

Are there any C# attributes that I can apply to class members, to change the way they appear in the Intellisense listings? This popped into my head when I was building a cla

相关标签:
3条回答
  • 2021-01-14 09:31

    Turns out there also some other attributes at Custom intellisense for server controls? (But the search continues!)

    [EditorBrowsable(EditorBrowsableState.Never)]
    
    0 讨论(0)
  • 2021-01-14 09:32

    I tend to think that manipulating the comments is a much better proposition.

    ///<summary>
    /// Bomb!
    ///</summary>
    ///<example></example><value></value><![CDATA[]]><param name="ss"></param><exception   cref="ss"></exception><remarks></remarks>
    ///<returns></returns> 
    

    If you dig into the options available in the comment structure(which the intellisense and compiler understands) like <example>,<include>,<see>,<seealso>,<exception> etc, you can pretty get all the functionality sans performance dip introduced by the attribute.

    0 讨论(0)
  • 2021-01-14 09:51

    There's the DebuggerDisplay attribute described here.

    0 讨论(0)
提交回复
热议问题