mardi 23 juillet 2019

Getting object property value in non public members

In my cookie collection, I need to retrieve this value and I realize that I can use reflection to do it. After seeking some references from Google, I keep getting null from my code. Anyone know where's my problem?

var cookielist = 
allCookies.GetType().GetField("m_list[0]", BindingFlags.NonPublic | BindingFlags.Instance);

enter image description here





Aucun commentaire:

Enregistrer un commentaire