By 2050, many armies are making use of electromagnetic propulsion for weapons. Despite demanding power requirements, they are in some ways simpler to service than conventional weapons.
Common fascination lies with the Rail Guns used by a number of military vehicles. Magnets flanking a conductive projectile use Lorentz force to accelerate it to phenomenal speeds. There is an upper limit to the velocity of chemical rounds, and these guns surpass that. In fact, the mostly steel rounds need a ceramic coating so they don't melt or vaporize en-route to the target. Due to energy requirements, and the force involved, these weapons are limited to fairly small calibers - 30 to 60 millimeters - but for armor piercing a smaller cross section is ideal.
Large coil guns or conventional cannons are used for more general purpose ammunition.
Gauss Rifles, the infantry weapon, are somewhat less impressive. They are best thought of as the 21st century Kalashnikov assault rifle. Like the AK, they are exceedingly simple to repair and train with - the US M-32 rifle has only four moving parts (Magazine follower, Chamber loader, Trigger, and fire mode selection switch.) and since it lacks propellant - the any barrel fouling is due to the environment. Also like the AK, gauss rifles tend to have poor ergonomics - the length and weight of the magnetic coils make the weapons rather unwieldly in close combat.
Two main kinds of gauss riles exist. Full-Mag guns rely solely on magnetic propulsion, while Assisted-Mag weapons have some propellant giving the initial impetus to the round. The latter allows for less energy consumption, shorter lighter barrels, and the ability to operate without batteries in an emergency. However, they maintain most of the weaknesses of conventional weapons.
Generally speaking the mode selector allows the user to chose between rate of fire, and the power of individual rounds. Using the American M-32 as an example there are three fire modes. Setting S: fires quickly, but at subsonic velocities, in theory allowing for close quarter combat and stealth. (Remember, the gun is as long and heavy as an old M-14, so its not quite a good substitute for a SMG.) Next is A, Assault rifle - operating at velocities and rate of fire very similar to the old M-16. Third on the dial is D, for designated marksman, in which case the rifle operates semi-automatic only but charges until the rounds carry the power of a 7.62mm round, capable of engaging point targets at up to a kilometer. .Finally, L stands for locked - the gun is disarmed.
Its also worth noting there are heavy gauss riles that operate as squad support weapons. Like their lesser brethren, they have multiple fire modes to change their role in a fire team. These guns tend to have three modes - light machine-gun with a high rate of fire (similar to an M-249 SAW), Slower firing General Purpose MG (like a 7.62mm PKM) or semi-automatic anti-material rifle. (Like a Barret M2A2).