Language

JniEnvironment.Types.IsSameObject Method

Definition

Compares Java object identity rather than JNI handle values.

public static bool IsSameObject(Java.Interop.JniObjectReference object1, Java.Interop.JniObjectReference object2);
static member IsSameObject : Java.Interop.JniObjectReference * Java.Interop.JniObjectReference -> bool

Parameters

object1
JniObjectReference

The first JNI object reference; a zero handle represents Java null.

object2
JniObjectReference

The second JNI object reference; a zero handle represents Java null.

Returns

true if both references identify the same Java object or both represent Java null; 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