Click or drag to resize

IJavaObjectSetField Method

Writes a value to an instance field on the underlying JVM object.

Namespace: MASES.JCOBridge.C2JBridge.JVMInterop
Assembly: C2JBridge (in C2JBridge.dll) Version: 2.6.9.260611-9a148513a79c26cdd7f1dde468f4f9e06ef3bc7e
Syntax
void SetField(
	string fieldName,
	Object val
)

Parameters

fieldName  String
The name of the Java instance field to write.
val  Object
The value to assign. Must be compatible with the Java field's declared type: boxed .NET primitives, IJavaObject instances, or arrays of primitive types.
Exceptions
ExceptionCondition
InvalidOperationException Thrown if no field named fieldName is found on the underlying Java class.
InvalidCastException Thrown if val is not assignable to the Java field's declared type.
See Also