C. Nothing in this section shall be construed by a court of law or otherwise as entitling the tenant, upon the termination of the tenancy, to an immediate credit against the tenant's delinquent rent account in the amount of the security deposit. The landlord shall apply the security deposit in accordance with this section within the 45-day time period required by subsection A. However, provided that the landlord has given prior written notice in accordance with this section, the landlord may withhold a reasonable portion of the security deposit to cover an amount of the balance due on the water, sewer, or other utility account that is an obligation of the tenant to a third-party provider under the rental agreement for the dwelling unit, and upon payment of such obligations the landlord shall provide written confirmation to the tenant within 10 days, along with payment to the tenant of any balance otherwise due to the tenant. In order to withhold such funds as part of the disposition of the security deposit, the landlord shall have so advised the tenant of his rights and obligations under this section in (i) a termination notice to the tenant in accordance with this chapter, (ii) a written notice to the tenant confirming the vacating date in accordance with this section, or (iii) a separate written notice to the tenant at least 15 days prior to the disposition of the security deposit. Any written notice to the tenant shall be given in accordance with § 55.1-1202. The tenant may provide the landlord with written confirmation of the payment of the final water, sewer, or other utility bill for the dwelling unit, in which case the landlord shall refund the security deposit, unless there are other authorized deductions, within the 45-day period required by subsection A. If the tenant provides such written confirmation after the expiration of the 45-day period, the landlord shall refund any remaining balance of the security deposit held to the tenant within 10 days following the receipt of such written confirmation provided by the tenant. If the landlord otherwise receives confirmation of payment of the final water, sewer, or other utility bill for the dwelling unit, the landlord shall refund the security deposit, unless there are other authorized deductions, within the 45-day period.