Instanceof.JScriptInstanceof(Object, Object) 方法
定义
确定是否可将第一个指定对象强制转换为第二个指定对象的类型。Determines whether the first specified object can be coerced to the type of the second specified object.
此 API 支持产品基础结构,不能在代码中直接使用。
public:
static bool JScriptInstanceof(System::Object ^ v1, System::Object ^ v2);
public static bool JScriptInstanceof (object v1, object v2);
static member JScriptInstanceof : obj * obj -> bool
Public Shared Function JScriptInstanceof (v1 As Object, v2 As Object) As Boolean
参数
- v1
- Object
要强制转换为对象 v2 的类型的对象。The object to coerce to the type of object v2.
- v2
- Object
具有所需类型的对象。The object that has the desired type.
返回
如果可将 v1 强制转换为对象 v2 的类型,则为 true;否则为 false。true if v1 can be coerced to the type of object v2; otherwise, false.