lundi 4 juillet 2016

How to call Method of Private Property using Reflection in c#?

i have some problems with my project

I want to call 1 method from private Property like private clsBUS_DEMO prop_DEMO

clsBUS_DEMO have Method Name is public void SayHello()

This is my code

PropertyInfo p = this.GetType().GetProperty("SayHello");

p is null because program can't find prop_DEMO

Anyone can't help me about this?





Aucun commentaire:

Enregistrer un commentaire