   [.net] Using a dictionary with methods as value in key/value pair?
  General question, I'm trying to build an input manager class for XNA.Is it possible to use a method or delegate as the value in a Dictionary?  My thought was to have each game state (paused, inCombat, travelling, inMenu, etc) contain its own key mapping dictionary, so that the input manager class just takes in the key/button press and feeds it to the current state's (in a state stack) key mapping dictionary, where the value of the dictionary entry would be a related method like "moveForward()" versus "cycleThroughMenu()" for a press of Keys.Up.Knowing what I'm trying to do, if my idea isn't possible, might anyone else have suggestions?  This is my first time trying to design an input handler that doesn't just rely on 500 if(KeyboardState.isKeyPressed(Keys.A)){dostuff();} statements.   
  Yes this is very possible.  I often use delegates in dictionaries and other look up structures.  You can for example Make a Dictionary<char,Action<char>> and call it based on the input myDict[inputChar](inputChar);  I'm not sure if you can use a method/delegate DIRECTLY as a value, but you CAN store a delegate in a class and then store that class in the dictionary.  I use this extensively in one of my projects and it works great.   