Can I patch a light dimmer switch onto an extension cord?

The dimmer switch has three wires, two are black and one is green.
1 answer 1