ObjectInputStream.GetField.Get 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.

Overloads

Get(String, Object)

Get the value of the named Object field from the persistent field.

Get(String, Boolean)

Get the value of the named boolean field from the persistent field.

Get(String, Char)

Get the value of the named char field from the persistent field.

Get(String, Double)

Get the value of the named double field from the persistent field.

Get(String, Int16)

Get the value of the named short field from the persistent field.

Get(String, Int32)

Get the value of the named int field from the persistent field.

Get(String, Int64)

Get the value of the named long field from the persistent field.

Get(String, SByte)

Get the value of the named byte field from the persistent field.

Get(String, Single)

Get the value of the named float field from the persistent field.

Get(String, Object)

Get the value of the named Object field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;", "GetGet_Ljava_lang_String_Ljava_lang_Object_Handler")]
public abstract Java.Lang.Object Get(string name, Java.Lang.Object val);

Parameters

name
String

the name of the field

val
Object

the default value to use if name does not have a value

Returns

the value of the named Object field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not Object.

Remarks

Get the value of the named Object field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, java.lang.Object).

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

.NET for Android .NET for Android API 36 and other versions
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35, .NET for Android API 36

Get(String, Boolean)

Get the value of the named boolean field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;Z)Z", "GetGet_Ljava_lang_String_ZHandler")]
public abstract bool Get(string name, bool val);

Parameters

name
String

the name of the field

val
Boolean

the default value to use if name does not have a value

Returns

the value of the named boolean field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not boolean.

Remarks

Get the value of the named boolean field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, boolean).

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

.NET for Android .NET for Android API 36 and other versions
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35, .NET for Android API 36

Get(String, Char)

Get the value of the named char field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;C)C", "GetGet_Ljava_lang_String_CHandler")]
public abstract char Get(string name, char val);

Parameters

name
String

the name of the field

val
Char

the default value to use if name does not have a value

Returns

the value of the named char field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not char.

Remarks

Get the value of the named char field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, 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

.NET for Android .NET for Android API 36 and other versions
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35, .NET for Android API 36

Get(String, Double)

Get the value of the named double field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;D)D", "GetGet_Ljava_lang_String_DHandler")]
public abstract double Get(string name, double val);

Parameters

name
String

the name of the field

val
Double

the default value to use if name does not have a value

Returns

the value of the named double field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not double.

Remarks

Get the value of the named double field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, double).

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

.NET for Android .NET for Android API 36 and other versions
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35, .NET for Android API 36

Get(String, Int16)

Get the value of the named short field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;S)S", "GetGet_Ljava_lang_String_SHandler")]
public abstract short Get(string name, short val);

Parameters

name
String

the name of the field

val
Int16

the default value to use if name does not have a value

Returns

the value of the named short field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not short.

Remarks

Get the value of the named short field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, short).

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

.NET for Android .NET for Android API 36 and other versions
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35, .NET for Android API 36

Get(String, Int32)

Get the value of the named int field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;I)I", "GetGet_Ljava_lang_String_IHandler")]
public abstract int Get(string name, int val);

Parameters

name
String

the name of the field

val
Int32

the default value to use if name does not have a value

Returns

the value of the named int field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not int.

Remarks

Get the value of the named int field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, int).

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

.NET for Android .NET for Android API 36 and other versions
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35, .NET for Android API 36

Get(String, Int64)

Get the value of the named long field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;J)J", "GetGet_Ljava_lang_String_JHandler")]
public abstract long Get(string name, long val);

Parameters

name
String

the name of the field

val
Int64

the default value to use if name does not have a value

Returns

the value of the named long field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not long.

Remarks

Get the value of the named long field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, 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

.NET for Android .NET for Android API 36 and other versions
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35, .NET for Android API 36

Get(String, SByte)

Get the value of the named byte field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;B)B", "GetGet_Ljava_lang_String_BHandler")]
public abstract sbyte Get(string name, sbyte val);

Parameters

name
String

the name of the field

val
SByte

the default value to use if name does not have a value

Returns

the value of the named byte field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by name is not byte.

Remarks

Get the value of the named byte field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, byte).

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

.NET for Android .NET for Android API 36 and other versions
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35, .NET for Android API 36

Get(String, Single)

Get the value of the named float field from the persistent field.

[Android.Runtime.Register("get", "(Ljava/lang/String;F)F", "GetGet_Ljava_lang_String_FHandler")]
public abstract float Get(string name, float val);

Parameters

name
String

the name of the field

val
Single

the default value to use if name does not have a value

Returns

the value of the named float field

Attributes

Exceptions

if an error occurs while reading from the source input stream.

if the type of the field identified by float is not char.

Remarks

Get the value of the named float field from the persistent field.

Java documentation for java.io.ObjectInputStream.GetField.get(java.lang.String, float).

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

.NET for Android .NET for Android API 36 and other versions
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35, .NET for Android API 36