Because you do it like this...
HashMap<int, List<string> >
Note the space after list, least I think that's right, I remember hitting something similar like this before.
On topic however, its not as well simple as how do you build console games and PC with the same code. IF you can even get the development environment for those consoles for a start, you'd likely have to create a layer of abstraction over the common functionality needed to create the systems you need on those specific environments. Not a one man job, alas. Not unless you got a lot of time on your hands.