In the code below, in the setter for RawAdapter, I would like to cast/convert
the value variable from Java.Lang.Object to generic type T.  I have not
found a simple way to do this.  In this example T must derive from
Android.Widget.IAdapter.



        public abstract T Adapter { get; set; }

        protected override Java.Lang.Object RawAdapter
        {
            get
            {
                return Adapter.JavaCast<Java.Lang.Object>();
            }
            set
            {
                Adapter = value.JavaCast<T>(); //causes error
            }
        }

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/How-to-convert-tp5710770.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

Reply via email to