Polarization of electrons in quantum dashes in magnetic field