I read by dragging a switch here and stumbled upon this code.
Can someone explain what is () => {}and what should I read to understand this line of code?
var moveMap = new Dictionary<string, Action>()
{
{"Up", MoveUp},
{"Down", MoveDown},
{"Left", MoveLeft},
{"Right", MoveRight},
{"Combo", () => { MoveUp(); MoveUp(); MoveDown(); MoveDown(); }}
};
moveMap[move]();
Magic source
share