<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="../4_X02.xsl"?><ownershipDocument>    <schemaVersion>X0303</schemaVersion>    <documentType>4</documentType>    <periodOfReport>2010-03-31</periodOfReport>    <notSubjectToSection16>0</notSubjectToSection16>    <issuer>        <issuerCik>0000806279</issuerCik>        <issuerName>CODORUS VALLEY BANCORP INC</issuerName>        <issuerTradingSymbol>CVLY</issuerTradingSymbol>    </issuer>    <reportingOwner>        <reportingOwnerId>            <rptOwnerCik>0001234194</rptOwnerCik>            <rptOwnerName>KREBS RODNEY L</rptOwnerName>        </reportingOwnerId>        <reportingOwnerAddress>            <rptOwnerStreet1></rptOwnerStreet1>            <rptOwnerStreet2></rptOwnerStreet2>            <rptOwnerCity></rptOwnerCity>            <rptOwnerState></rptOwnerState>            <rptOwnerZipCode></rptOwnerZipCode>            <rptOwnerStateDescription></rptOwnerStateDescription>        </reportingOwnerAddress>        <reportingOwnerRelationship>            <isDirector>1</isDirector>            <isOfficer>0</isOfficer>            <isTenPercentOwner>0</isTenPercentOwner>            <isOther>0</isOther>        </reportingOwnerRelationship>    </reportingOwner>    <nonDerivativeTable>        <nonDerivativeTransaction>            <securityTitle>                <value>Common Stock</value>            </securityTitle>            <transactionDate>                <value>2010-03-31</value>            </transactionDate>            <transactionCoding>                <transactionFormType>4</transactionFormType>                <transactionCode>P</transactionCode>                <equitySwapInvolved>0</equitySwapInvolved>            </transactionCoding>            <transactionTimeliness>                <value></value>            </transactionTimeliness>            <transactionAmounts>                <transactionShares>                    <value>1500</value>                </transactionShares>                <transactionPricePerShare>                    <value>7.44</value>                </transactionPricePerShare>                <transactionAcquiredDisposedCode>                    <value>A</value>                </transactionAcquiredDisposedCode>            </transactionAmounts>            <postTransactionAmounts>                <sharesOwnedFollowingTransaction>                    <value>53749.907</value>                </sharesOwnedFollowingTransaction>            </postTransactionAmounts>            <ownershipNature>                <directOrIndirectOwnership>                    <value>D</value>                </directOrIndirectOwnership>            </ownershipNature>        </nonDerivativeTransaction>        <nonDerivativeTransaction>            <securityTitle>                <value>Common Stock</value>            </securityTitle>            <transactionDate>                <value>2010-03-31</value>            </transactionDate>            <transactionCoding>                <transactionFormType>4</transactionFormType>                <transactionCode>P</transactionCode>                <equitySwapInvolved>0</equitySwapInvolved>            </transactionCoding>            <transactionTimeliness>                <value></value>            </transactionTimeliness>            <transactionAmounts>                <transactionShares>                    <value>2000</value>                </transactionShares>                <transactionPricePerShare>                    <value>7.3</value>                </transactionPricePerShare>                <transactionAcquiredDisposedCode>                    <value>A</value>                </transactionAcquiredDisposedCode>            </transactionAmounts>            <postTransactionAmounts>                <sharesOwnedFollowingTransaction>                    <value>55749.907</value>                </sharesOwnedFollowingTransaction>            </postTransactionAmounts>            <ownershipNature>                <directOrIndirectOwnership>                    <value>D</value>                </directOrIndirectOwnership>            </ownershipNature>        </nonDerivativeTransaction>    </nonDerivativeTable>    <ownerSignature>        <signatureName>/s/Rodney L. Krebs</signatureName>        <signatureDate>2010-04-01</signatureDate>    </ownerSignature></ownershipDocument>