3
Answers

how to call private method in c# with useing its parameters

zeeshan khan

zeeshan khan

8y
319
1

var mpc=new class();
Type type=mpc.getype();
var output = (string)type.InvokeMember("Method Name";MyPrivateFunc" BindingFlags.Instance | BindingFlags.InvokeMethod|
BindingFlags.NonPublic, null, mpc,
new object[] {"Is Exposed private Member ? "});



i can call simply method with the help of these code but when i use parameters its error occur why????????
Answers (3)