DynamicallyAccessedMembersAttribute 类   
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指示指定 Type 上的某些成员以动态方式进行访问,例如通过 System.Reflection 进行。
public ref class DynamicallyAccessedMembersAttribute sealed : Attribute
	[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.GenericParameter | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue, Inherited=false)]
public sealed class DynamicallyAccessedMembersAttribute : Attribute
	[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.GenericParameter | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue | System.AttributeTargets.Struct, Inherited=false)]
public sealed class DynamicallyAccessedMembersAttribute : Attribute
	[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.GenericParameter | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue, Inherited=false)>]
type DynamicallyAccessedMembersAttribute = class
    inherit Attribute
	[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.GenericParameter | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue | System.AttributeTargets.Struct, Inherited=false)>]
type DynamicallyAccessedMembersAttribute = class
    inherit Attribute
	Public NotInheritable Class DynamicallyAccessedMembersAttribute
Inherits Attribute
		- 继承
 
- 属性
 
注解
此属性允许工具了解在执行程序期间正在访问哪些成员。
此属性对类型为 Type 或 String的成员有效。
当此属性应用于 类型 String的位置时,假设字符串表示完全限定的类型名称。
如果特性应用于方法,则会将其视为特殊情况,这意味着应将特性应用于方法的“this”参数。 特性仅应用于可 Type 分配给 (或 string的类型的实例方法,但任何方法都不会) 使用它。
有关详细信息,请参阅 剪裁警告简介。
构造函数
| DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes) | 
		 使用指定的成员类型初始化 DynamicallyAccessedMembersAttribute 类的新实例。  | 
        	
属性
| MemberTypes | 
		 获取可指定动态访问的成员类型的 DynamicallyAccessedMemberTypes。  | 
        	
| TypeId | 
		 在派生类中实现时,获取此 Attribute 的唯一标识符。 (继承自 Attribute) | 
        	
方法
| Equals(Object) | 
		 返回一个值,该值指示此实例是否与指定的对象相等。 (继承自 Attribute) | 
        	
| GetHashCode() | 
		 返回此实例的哈希代码。 (继承自 Attribute) | 
        	
| GetType() | 
		 获取当前实例的 Type。 (继承自 Object) | 
        	
| IsDefaultAttribute() | 
		 在派生类中重写时,指示此实例的值是否是派生类的默认值。 (继承自 Attribute) | 
        	
| Match(Object) | 
		 当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。 (继承自 Attribute) | 
        	
| MemberwiseClone() | 
		 创建当前 Object 的浅表副本。 (继承自 Object) | 
        	
| ToString() | 
		 返回表示当前对象的字符串。 (继承自 Object) |