1 EXHIBIT 23.1 CONSENT OF ERNST & YOUNG LLP 2 CONSENT OF INDEPENDENT AUDITORS We consent to the incorporation by reference in this Registration Statement (Form S-8) pertaining to the Codorus Valley Bancorp, Inc. 2000 Stock Incentive Plan of our report dated January 14, 2000, with respect to the consolidated financial statements of Codorus Valley Bancorp, Inc. incorporated by reference in its Annual Report (Form 10-K) for the year ended December 31, 1999, filed with the Securities and Exchange Commission. /s/ Ernst & Young LLP Harrisburg, Pennsylvania June 26, 2000