Here is the code I use to get a setter via reflection:
// Def
public static T GetPropertySetter<T> (System.Object o, string propName) {
var prop = o.GetType().GetProperty( propName )
var setter = o.GetSetMethod();
...
}
// Call
var mySetter = GetPropertySetter<Func<int>>(myObject, "X");
The problem is, if myObject is the a ".Net" object, it works fine. But if
the object is a "Java.Lang.Object", the GetSetMethod() will always return
null.
My question is, is that a expected behavior (you can only reflect .net
object?) or I did something wrong?
Thanks
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Reflection-GetSetMethod-of-Java-Lang-Object-always-return-null-tp5712757.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid