lahsrah
lahsrah

Reputation: 9173

Xamarin Android how to get Java class name for passing into ComponentName

I need the Java class's name in the Constructor for Android.Content.ComponentName as Xamarin doesn't have an overloaded constructor that takes typeof(ClrType) like it does for some other things.

Upvotes: 12

Views: 5332

Answers (1)

lahsrah
lahsrah

Reputation: 9173

I was able to solve it by doing this: Java.Lang.Class.FromType(typeof(MyClass)).Name

Upvotes: 23

Related Questions