Java.Lang.ClassLoader.LoadClass Method
Loads the class with the specified name, optionally linking it after loading.

Syntax

[Android.Runtime.Register("loadClass", "(Ljava/lang/String;Z)Ljava/lang/Class;", "GetLoadClass_Ljava_lang_String_ZHandler")]
protected virtual Class LoadClass (string className, bool resolve)

Parameters

className
the name of the class to look for.
resolve
Indicates if the class should be resolved after loading. This parameter is ignored on the Android reference implementation; classes are not resolved.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.ClassNotFoundExceptionif the class can not be found.

Remarks

Loads the class with the specified name, optionally linking it after loading. The following steps are performed:

  1. Call ClassLoader.FindLoadedClass(string) to determine if the requested class has already been loaded.
  2. If the class has not yet been loaded: Invoke this method on the parent class loader.
  3. If the class has still not been loaded: Call ClassLoader.FindClass(string) to find the class.

Note: In the Android reference implementation, the resolve parameter is ignored; classes are never linked.

[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