Android Guides | Samples

Java.Lang.Class.EnclosingClass Property

Returns the class enclosing this class.

Syntax

[get: Android.Runtime.Register("getEnclosingClass", "()Ljava/lang/Class;", "GetGetEnclosingClassHandler")]
public Class EnclosingClass { get; }

Remarks

Returns the class enclosing this class. For most classes this is the same as the Class.DeclaringClass. For classes defined within a method or constructor (typically anonymous inner classes), this is the declaring class of that member.

[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