Reflection
Asked by Anonymous
16 years ago.
Hi,
I'm trying to use reflection to change some DayPilotScheduler properties but it doesn't work...
Do you have a code snippet/example that does it ? It would be appreciated and also useful
for other users.
Though, here's my code:
Assembly dayPilotAssembly = Assembly.LoadFrom(Server.MapPath("~") + "\\Bin\\DayPilot.dll");
Type schedulerType = dayPilotAssembly.GetType(DayPilot.Web.Ui.DayPilotScheduler");
object result = null;
object[] arguments = {16};
result = schedulerType.InvokeMember("HourFontSize",BindingFlags.Public | BindingFlags.SetFields, null, DayPilotScheduler1,arguments);
The error tells that I have a MissingFieldException, i.e., that HourFontSize doesn't exists.
Thanks,
Max