public void FireEvent(int idx, object sender, FrameWorkEventArg arg) { LinkedList <EventHandler <FrameWorkEventArg> > eventsList = null; if (!m_EventDict.TryGetValue(idx, out eventsList)) { return; } LinkedListNode <EventHandler <FrameWorkEventArg> > node = eventsList.First; while (node != null) { LinkedListNode <EventHandler <FrameWorkEventArg> > next = node.Next; node.Value(sender, arg); node = next; } }