I am having problems using reflection on my objects that are tied in with NHibernate. Basically, I have a "Customer" object that has a property of "Name", when inspecting the object in the debugger it seems that the method is actually "get_Name".
When I call invokeMember(with all of the binding flags I could think of) it keeps throwing a no member found exception. I have tried "get_Name" and "Name" but no luck.
Does anyone know how to get to this to work?
Code:
ListView lvi = new ListView();
lvi.Text = t.InvokeMember(
"get_Name",
BindingFlags.Default,
null,
obj,
null);