The solder itself is the same, or close. The old stuff you have is probably 60/40 or 50/50 solder.
For electric work, you should use a much finer (thinner) rosin cored solder. Your plumber's solder requires the use of acid flux, which will do bad things to electric components in time. Electric solder is like a tube (very small tube) filled with a special "rosin" flux, non-corrosive. Pick some up at your local hardware store. Be sure it says "Rosin cored", then you don't need to worry about fluxes.