Android Guides | Samples

Java.Lang.Class.EnclosingClass Property

Returns the class enclosing this class.


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


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]


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