Electrical Questions? Ask an Electrician Online.
Hi, I'm Mike and I'll be assisting you. Please stand by while I review your question.
Having a black and white in a switch box indicates the white is being used as a black wire. It should have been marked with black tape. To verify you'll need a 2 wire voltage tester. Test the white to the ground wire or metal box for voltage. The white should be the hot wire and the black the switched hot.
The wire that goes to the fixture and is hot or not depending on the position of the switch.
That is the way it should be if it was wired correctly. That's why I told you to test the wires. Sometimes things are not as they should be.
Very good, glad to help. I'd appreciate a 5 star rating.