InputManager problems 2D

Greetings, I took some time programming in monogame , and now I 've noticed a problem. When I move my player with the arrows and I press another key continuously , the player moves randomly and ignores the key I’m pressing. This happens too in the Microsoft XNA tutorials .

Someone has this happened too?

Here I attached a piece of code of the player and InputManager class.

Thank you for your help.

InputManager Class

Player Class

You should use an IF Statement for each, instead of else if.

That depends on the behavior you want, but it won’t solve this issue.

Could you show a little more of your InputManager, like how state is updated? It seems a bit weird with the two collections.