  A model is presented for $pn$ junction formation near metal-semiconductor
contacts in two-dimensional semiconducting systems such as graphene. Carrier
type switching occurs in a region near the metal-semiconductor junction when
energy band bending leads to a crossing between the junction Fermi level and
the Dirac energy. A bias-dependent depletion region occurs due to the
minimization of carrier density, which is shown to act as an additional
parasitic resistance in devices. The $pn$ junction resistance is demonstrated
by its implementation in a transfer length structure.
