ExperimentalAttribute 类 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指示 API 是实验性的,将来可能会更改。
public ref class ExperimentalAttribute sealed : Attribute[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Module | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)]
public sealed class ExperimentalAttribute : Attribute[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Module | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)>]
type ExperimentalAttribute = class
    inherit AttributePublic NotInheritable Class ExperimentalAttribute
Inherits Attribute- 继承
- 属性
注解
ExperimentalAttribute 允许使用诊断来标记调用站点,该诊断指示使用了实验性功能。 可以使用此属性在其他稳定库中提供预览功能。
有关将 API 标记为预览版的详细信息,请参阅 预览 API。
构造函数
| ExperimentalAttribute(String) | 初始化 类的新实例 ExperimentalAttribute ,指定编译器在报告属性适用的 API 时使用的 ID。 | 
属性
| DiagnosticId | 获取编译器在报告属性所应用于的 API 的使用情况时将使用的 ID。 | 
| TypeId | 在派生类中实现时,获取此 Attribute 的唯一标识符。(继承自 Attribute) | 
| UrlFormat | 获取或设置相应文档的 URL。 API 接受格式字符串,而不是实际的 URL,进而创建包含诊断 ID 的通用 URL。 | 
方法
| Equals(Object) | 返回一个值,该值指示此实例是否与指定的对象相等。(继承自 Attribute) | 
| GetHashCode() | 返回此实例的哈希代码。(继承自 Attribute) | 
| GetType() | 获取当前实例的 Type。(继承自 Object) | 
| IsDefaultAttribute() | 在派生类中重写时,指示此实例的值是否是派生类的默认值。(继承自 Attribute) | 
| Match(Object) | 当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。(继承自 Attribute) | 
| MemberwiseClone() | 创建当前 Object 的浅表副本。(继承自 Object) | 
| ToString() | 返回表示当前对象的字符串。(继承自 Object) |