Quantum size effects in metallic nanostructures