Java.Lang.Class.ForName Method
Returns a Class object which represents the class with the given name.

Syntax

[Android.Runtime.Register("forName", "(Ljava/lang/String;)Ljava/lang/Class;", "")]
public static Class ForName (string className)

Parameters

className
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.ClassNotFoundExceptionif the requested class cannot be found.
Java.Lang.LinkageErrorif an error occurs during linkage
Java.Lang.ExceptionInInitializerErrorif an exception occurs during static initialization of a class.

Remarks

Returns a Class object which represents the class with the given name. The name should be the name of a non-primitive class, as described in the Java.Lang.Class. Primitive types can not be found using this method; use int.class or Integer.TYPE instead.

If the class has not yet been loaded, it is loaded and initialized first. This is done through either the class loader of the calling class or one of its parent class loaders. It is possible that a static initializer is run as a result of this call.

[Android Documentation]

Requirements

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