Field.SetLong(Object, Int64) Method

Definition

Sets the value of a field as a long on the specified object.

[Android.Runtime.Register("setLong", "(Ljava/lang/Object;J)V", "")]
public void SetLong (Java.Lang.Object? obj, long l);
[<Android.Runtime.Register("setLong", "(Ljava/lang/Object;J)V", "")>]
member this.SetLong : Java.Lang.Object * int64 -> unit

Parameters

obj
Object

the object whose field should be modified

l
Int64

the new value for the field of obj being modified

Attributes

Exceptions

if the object is null and the field is non-static

if the object is not compatible with the declaring class

if this field is not accessible

Remarks

Sets the value of a field as a long on the specified object. This method is equivalent to set(obj, lObj), where lObj is a Long object and lObj.longValue() == l.

Java documentation for java.lang.reflect.Field.setLong(java.lang.Object, long).

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