I've never done this sort of thing, but I would try JavaCast<>() here
if (JavaCast<Java.Lang.Type>(!GetType ().Equals(typeof (MediaInfo)))) and if that doesn't work exactly, break your line up into separate statements and try different combinations of JavaCast on the intermediate values. On Aug 12, 2013 8:11 AM, "venkatesh" <venkates...@sierratec.com> wrote: > Hi all, > > I am facing the issue when binding java enum type to c#(Binding third party > jar -wasabi.jar file) . I am struggling to solve the below issue. > > Java enum Type > ============ > > protected MediaInfo(*MediaInfo.Type type*, > int format, > int encMethod, > int duration, > int bitrate) > > Here MediaInfo.Type is enum type passing to MediaInfo constructor. > > C# Method: > > [Register (".ctor", "(Lcom/intertrust/wasabi/media/MediaInfo$Type;IIII)V", > "")] > *protected MediaInfo > (global::Com.Intertrust.Wasabi.Media.MediaInfo.Type p0*, int p1, int p2, > int > p3, int p4) : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer) > { > if (Handle != IntPtr.Zero) > return; > > if (!GetType ().Equals(typeof (MediaInfo))) { > /*/Errors > //The best overloaded method match for > 'Android.Runtime.JNIEnv.CreateInstance(System.Type, string, params > Android.Runtime.JValue[])' has some invalid arguments > //cannot convert from 'Com.Intertrust.Wasabi.Media.MediaInfo.Type' to > 'System.Type > * > *SetHandle > (global::Android.Runtime.JNIEnv.CreateInstance (GetType ()*, > "(Lcom/intertrust/wasabi/media/MediaInfo$Type;IIII)V", new JValue (p0), new > JValue (p1), new JValue (p2), new JValue (p3), new JValue (p4)), > JniHandleOwnership.TransferLocalRef); > return; > } > > Kindly suggest me on this. > > > > -- > View this message in context: > http://mono-for-android.1047100.n5.nabble.com/Java-Binding-enum-type-to-C-in-XAMARIN-tp5713478.html > Sent from the Mono for Android mailing list archive at Nabble.com. > _______________________________________________ > Monodroid mailing list > Monodroid@lists.ximian.com > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid >
_______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid