More on C# with Office
Sometimes the Excel or Word API provides more than one way to call a function, but only one function is visible in C#. In this case you can use InvokeMember to call the version you want. e.g.
Axes axes = (Axes)chart.GetType().InvokeMember("Axes", BindingFlags.InvokeMethod, null, chart, no_args);
Axes axes = (Axes)chart.GetType().InvokeMember("Axes", BindingFlags.InvokeMethod, null, chart, no_args);
0 Comments:
Post a Comment
<< Home