You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've submitted a patch upstream which allows access to private and protected
members when you create a type accessor like:
var accessor = TypeAccessor.Create(typeof(yourClass), true);
The patchset is attached to this comment.
I applied the patch and I still only get public members returned.
If you look in MemberSet.cs @ 16, it makes sense because type.GetFields() only
returns public members if there are no arguments.
Adding:
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance
to the arguments of that method call does seem to work.
Oh well, that didn't work either. Apparantly you can't access private fields,
you'll get an exception if you try. See here:
http://stackoverflow.com/questions/6356371/help-needed-with-typeaccessexception-
attempt-by-method-to-access-type-f
Original issue reported on code.google.com by
[email protected]
on 22 Nov 2012 at 2:15The text was updated successfully, but these errors were encountered: