【发布时间】:2012-09-30 05:16:51
【问题描述】:
我正在尝试创建一个字典来将枚举映射到具有相同签名的一组事件。我写道:
public enum Events {Insert, Update, Delete};
// this part makes errors
Dictionary<Events,EventHandler<T>> EventsDic = new Dictionary<Events,EventHandler<T>>()
{
{ Events.Insert , this.ItemInserted}
};
怎么了?
【问题讨论】:
标签: asp.net events dictionary delegates