You need to show the exact definition of the type you want to dig in using Reflection, but I can tell you the most typical mistakes leading to missing member information and the ways to overcome them.
System.Type.GetMembers
instead of System.Type.GetMember
, traverse the array of all members, and try to find out what's missing. In nearly all cases it helps to resolve your issue.System.Type.GetMember
. The problem is that the first argument is string
, but how do you know that you provided a correct name and that you did not simply make a typo? Where does your requested
come from? (Here is a hint for you: nameof
). If you answer this question and are interested in knowing how to go around without System.Type.GetMember
and strings, most likely I will be able to suggest the right technique for you.BindingFlags
value. First, you need to use my first advice to see what are the correct features of your member. An even clearer approach is this: start with the following value: BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static
. That's it, nothing else.