create a dictionary to map enums to events

FlashMayday

New Member
I'm trying to create a dictionary to map an enum to a set of events with the same signature . I wrote :\[code\]public enum Events {Insert, Update, Delete};// this part makes errorsDictionary<Events,EventHandler<T>> EventsDic = new Dictionary<Events,EventHandler<T>>(){ { Events.Insert , this.ItemInserted}};\[/code\]what's wrong ?
 
Back
Top