Surface Superconductivity in Type I and Type II Superconductors