  We analyse the role of the bang-bang property in affine optimal control
problems. We show that many essential stability properties of affine problems
are only satisfied when minimizers are bang-bang. Moreover, we prove that
almost any perturbation in an affine optimal control problem leads to a
bang-bang strict global minimizer. We work in an abstract framework that allows
to cover many problems in the literature of optimal control, this includes
problems constrained by partial and ordinary differential equations. We give
examples that show the applicability of our results to specific optimal control
problems.
