Java.Lang.Class has a special method for managed types:
Java | C# (Xamarin.Android) |
---|---|
ClickableSpan.class |
Java.Lang.Class.FromType(typeof(ClickableSpan)) |
can be implemented via extension:
public static class JavaLangExtensions
{
public static Java.Lang.Class GetClass(this Java.Lang.Object obj)
{
return Java.Lang.Class.FromType(obj.GetType());
}
}