my preference depends more on the situation. in games like L4D, i preffer shotguns, because they're good for splattering whatever comes close enough to hurt you [and it'll punch plenty of holes in a Smoker's tongue before it's tightened enough to disable you. Boomers also don't last more than 2 shots even at very long range].
games like Counterstrike, it depends on my role in the team. with randomers i go with assault rifles because i can shoot single shots well at long range and burst fire well enough to handle medium range combat. close range is easy. just spray and forget

. but when i'm playing with friends i know [the guys i go out with every weekend or so], i am typically a Sniper because i have better aim than most of the others on the team [I even remember scaring the guys into avoiding confrontation with me at one point, because i literally headshot someone without looking, staring at my iPod and choosing a better song. there was some luck involved, but mostly i knew the guy's behavioural habits so well i could more or less predict how he'd move and when he'd go '**** this' and try and charge me.]. when in zombie games i usually use the secondary weapon with the fastest rate of fire [in L4D2, it's dual handguns. alot of ammo, surprising accuracy and a high rate of fire. what more could you want in a gun?]. when in more strategic games [not that CSS is very strategic

] i use a heavy handgun as my secondary weapon [in CSS it's the Deagle whenever i can afford it. sometimes i actually choose the Deagle over a Primary weapon because i've got good enough aim that i can literally snipe with it [i've won several rounds that way]
in BF2, i'm majorly assault rifle. preferably Spec Ops, because the combination of equipment makes me more capable of supporting the team generally than others. though occasionally i use the Mechanic or Sniper, for Tank work and stealth killing respectively...