The electron affinity of a surface is closely related to, but distinct from, its work function. The work function is the thermodynamic work that can be obtained by reversibly and isothermally removing an electron from the material to vacuum; this thermodynamic electron goes to the "Fermi level" on average, not the conduction band edge: formula_2. While the work function of a semiconductor can be changed by doping, the electron affinity ideally does not change with doping and so it is closer to being a material constant. However, like work function the electron affinity does depend on the surface termination (crystal face, surface chemistry, etc.) and is strictly a surface property.