C
Claude
TValue oItem = (TValue)Activator.CreateInstance(typeof(TValue),
BindingFlags.Instance | BindingFlags.NonPublic,
null,
new object[] { m_nCleTemporaire },
System.Globalization.CultureInfo.CurrentCulture);
EventInfo oPropertyChanged = oItem.GetType().GetEvent("PropertyChanged");
MethodInfo eventHandler = this.GetType().GetMethod("Item_PropertyChanged",
BindingFlags.Instance | BindingFlags.NonPublic);
/** Next code line fails **/
Delegate d = Delegate.CreateDelegate(oPropertyChanged.EventHandlerType,
eventHandler);
The system says that it cannot murge the delegate with the defined type.
Why ???
Claude
BindingFlags.Instance | BindingFlags.NonPublic,
null,
new object[] { m_nCleTemporaire },
System.Globalization.CultureInfo.CurrentCulture);
EventInfo oPropertyChanged = oItem.GetType().GetEvent("PropertyChanged");
MethodInfo eventHandler = this.GetType().GetMethod("Item_PropertyChanged",
BindingFlags.Instance | BindingFlags.NonPublic);
/** Next code line fails **/
Delegate d = Delegate.CreateDelegate(oPropertyChanged.EventHandlerType,
eventHandler);
The system says that it cannot murge the delegate with the defined type.
Why ???
Claude