Language

JniEnvironment.Types.IsAssignableFrom Method

Definition

Tests whether instances of one Java class can be assigned to another Java type.

public static bool IsAssignableFrom(Java.Interop.JniObjectReference class1, Java.Interop.JniObjectReference class2);
static member IsAssignableFrom : Java.Interop.JniObjectReference * Java.Interop.JniObjectReference -> bool

Parameters

class1
JniObjectReference

A valid reference to the source Java class.

class2
JniObjectReference

A valid reference to the target Java class.

Returns

true if an instance of class1 can be assigned to class2; 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