The following code fails to find private fields, for example if host is Application.Current
and member is "_ownDispatcherStarted", it returns an empty array, but if if I look for a private property, for example member is "ParkingHwnd", it returns an array of length 1; it finds it ok. Why is that?
var hostType = host.GetType();
var members = host.GetType()
.GetMember(member, Public | NonPublic | Instance | FlattenHierarchy);
Aucun commentaire:
Enregistrer un commentaire