29

我在 .NET Framework BCL 中的许多类的 XML 注释中看到了这一点,但从未找到解释其作用的文档。

例如,查看 System.Object 会发现以下注释:

namespace System   
{
    /// <summary>Supports all classes in the .NET Framework class hierarchy 
    /// and provides low-level services to derived classes. This is the 
    /// ultimate base class of all classes in the .NET Framework; it is the
    /// root of the type hierarchy.</summary>
    /// <filterpriority>1</filterpriority> 
    [System.Runtime.InteropServices.ClassInterfaceAttribute(2)]
    public class Object    
    {    
        /// <summary>Determines whether the specified 
        /// <see cref="T:System.Object" /> 
        /// instances are considered equal.</summary>  
        /// <returns>true if objA is the same instance as objB or
        /// if both are null
        /// references or if objA.Equals(objB) returns true; 
        /// otherwise, false.</returns>
        /// <param name="objB">The second <see cref="T:System.Object" /> 
        /// to compare. </param>
        /// <param name="objA">The first <see cref="T:System.Object" /> 
        /// to compare. </param>
        /// <filterpriority>2</filterpriority>
        public static bool Equals(object objA, object objB);
     }
 }
4

2 回答 2

16

只是一个猜测:智能感知中的 All vs Common 选项卡?

于 2008-11-11T16:47:37.037 回答
8

这与使用 EditorBrowsableAttribute 装饰您的成员相同。我猜值 0,1 和 2 对应于 Always、Advanced 和 Never。

于 2009-01-03T12:53:50.130 回答