_Assembly.IsDefined(Type, Boolean) 方法  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为 COM 对象提供对 IsDefined(Type, Boolean) 方法的与版本无关的访问。
public:
 bool IsDefined(Type ^ attributeType, bool inherit);public bool IsDefined(Type attributeType, bool inherit);abstract member IsDefined : Type * bool -> boolPublic Function IsDefined (attributeType As Type, inherit As Boolean) As Boolean参数
- inherit
- Boolean
对于该类型的对象,将忽略此自变量。
返回
如果定义了由指定的 Type 标识的自定义属性,则为 true;否则为 false。
注解
此方法用于从非托管代码访问托管类,不应从托管代码调用。
方法 IsDefined 指示是否定义了由指定的 Type 标识的自定义属性。