fire extinguisher are used to stop the fire . in fire extinguisher carbon dioxide is present . fire can be extinguished by water also but not in the purpose of electrical equipment because water is a conductor of electricity therefore carbon dioxide is used widely as fire extinguisher .fire extinguisher where carbon dioxide is present inside helps to remove 1 of the important source which leads to the creation of fire and that is the oxygen . it makes a layer of carbon dioxide so that oxygen can't reach the fuel and as a result fire stops out burning .
i hope that this will help u..........................^_^