JSMethod.IsDefined(Type, Boolean) 方法

定义

确定指定的特性类型是否附加到此方法。Determines whether the specified attribute type is attached to this method.

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 override bool IsDefined(Type ^ type, bool inherit);
public override sealed bool IsDefined (Type type, bool inherit);
override this.IsDefined : Type * bool -> bool
Public Overrides NotOverridable Function IsDefined (type As Type, inherit As Boolean) As Boolean

参数

type
Type

要搜索的特性类型。The attribute type to search for.

inherit
Boolean

如果为 true,则搜索此成员的继承层次结构以查找特性。true to search this member's inheritance hierarchy to find the attributes.

返回

Boolean

在所有情况下均为 falsefalse in all cases.

适用于

另请参阅