Class.Cast(Object) Class.Cast(Object) Method

Definition

Casts the given object to the type represented by this Class.

[Android.Runtime.Register("cast", "(Ljava/lang/Object;)Ljava/lang/Object;", "")]
public Java.Lang.Object Cast (Java.Lang.Object obj);
member this.Cast : Java.Lang.Object -> Java.Lang.Object

Parameters

Returns

Exceptions

if the object cannot be cast to the given type.

Remarks

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