Reference.RefersTo(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Tests if the referent of this reference object is obj
.
[Android.Runtime.Register("refersTo", "(Ljava/lang/Object;)Z", "", ApiSince=33)]
public bool RefersTo (Java.Lang.Object? obj);
[<Android.Runtime.Register("refersTo", "(Ljava/lang/Object;)Z", "", ApiSince=33)>]
member this.RefersTo : Java.Lang.Object -> bool
Parameters
- obj
- Object
the object to compare with this reference object's referent
Returns
true
if obj
is the referent of this reference object
- Attributes
Remarks
Tests if the referent of this reference object is obj
. Using a null
obj
returns true
if the reference object has been cleared. Prefer this to a comparison with the result of get
.
Java documentation for java.lang.ref.Reference.refersTo(T)
.
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.