Turn off the dishwasher's power supply by turning off the dishwasher breaker in your home's main service panel.
Open the dishwasher door and locate the latch, which is located at the front-center portion of the top of the wash tub.
Remove the two screws securing the latch in place, and then remove the latch.
Align the new latch with the screw holes, and then install the two screws that secured the old latch in place.
Close and lock the dishwasher door to ensure proper alignment, and adjust the latch as needed.
Restore power to the dishwasher.