Java.Lang.Reflect.Field.GetShort Method
Returns the value of the field in the specified object as a short .

Syntax

[Android.Runtime.Register("getShort", "(Ljava/lang/Object;)S", "")]
public short GetShort (Java.Lang.Object object)

Parameters

object
the object to access

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.NullPointerExceptionif the object is null and the field is non-static
Java.Lang.IllegalArgumentExceptionif the object is not compatible with the declaring class
Java.Lang.IllegalAccessExceptionif this field is not accessible

Remarks

Returns the value of the field in the specified object as a short . This reproduces the effect of object.fieldName

If this field is static, the object argument is ignored. Otherwise, if the object is null, a NullPointerException is thrown. If the object is not an instance of the declaring class of the method, an IllegalArgumentException is thrown.

If this Field object is enforcing access control (see AccessibleObject) and this field is not accessible from the current context, an IllegalAccessException is thrown.

[Android Documentation]

Requirements

Namespace: Java.Lang.Reflect
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1