The effect of magnetic field on a capacitor with a superconducting electrode is studied with the Ginzburg-Landau approach. It is shown that the capacitance has a discontinuity at the onset of the surface superconductivity.