XML注释中的filterpriority标记有什么作用?

时间:2008-11-11 16:19:07

标签: .net xml-comments

我已经在.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);
     }
 }

2 个答案:

答案 0 :(得分:16)

只是一个猜测:intellisense中的All vs Common选项卡?

答案 1 :(得分:8)

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