Language

JniEnvironment.Types.IsInstanceOf Method

Definition

Tests whether a Java object is an instance of a class or interface.

public static bool IsInstanceOf(Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type);
static member IsInstanceOf : Java.Interop.JniObjectReference * Java.Interop.JniObjectReference -> bool

Parameters

instance
JniObjectReference

A valid Java object reference; this wrapper does not accept a zero handle.

type
JniObjectReference

A valid reference to the Java class or interface to test.

Returns

true if the object is an instance of the specified type; otherwise, false.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to