Tôi đã thấy điều này trong rất nhiều nhận xét XML cho các lớp trong .NET Framework BCL nhưng chưa bao giờ có thể tìm thấy tài liệu giải thích những gì nó làm.Thẻ filterpriority trong một nhận xét XML là gì?
Như một ví dụ, nhìn vào System.Object tiết lộ những ý kiến sau đây:
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);
}
}
Điều đó có thể xảy ra, nhưng các tab đó chỉ có sẵn trong IDE cho các dự án VB chứ không phải C#. Vì vậy, nếu đây thực sự là một tính năng duy nhất C# không áp dụng. –
Biến ra bạn là chính xác và đây là một tính năng chỉ VB. Một filterpriority = 2 là equiavalent để EditorBrowsable (EditorBrowsableState.Advanced) và phương thức chỉ hiển thị trên tab "All". Bạn cần phải có một tệp nhận xét XML được tạo để nó hoạt động. C# xuất hiện để bỏ qua nhận xét. –
Bạn có thể đăng liên kết đến nơi bạn tìm thấy không? Tôi tò mò vì tôi tự hỏi làm thế nào nó sẽ hành xử nếu xml không đồng ý với các thuộc tính. –