Sdílet prostřednictvím


Field.SetChar(Object, Char) Method

Definition

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

[Android.Runtime.Register("setChar", "(Ljava/lang/Object;C)V", "")]
public void SetChar (Java.Lang.Object? obj, char c);
[<Android.Runtime.Register("setChar", "(Ljava/lang/Object;C)V", "")>]
member this.SetChar : Java.Lang.Object * char -> unit

Parameters

obj
Object

the object whose field should be modified

c
Char

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 char on the specified object. This method is equivalent to set(obj, cObj), where cObj is a Character object and cObj.charValue() == c.

Java documentation for java.lang.reflect.Field.setChar(java.lang.Object, char).

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