Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 398
lahsrah Avatar asked May 24 '16 12:05

lahsrah


1 Answers

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

like image 193
lahsrah Avatar answered Oct 19 '22 23:10

lahsrah