Provided is a solenoid which is easier to assemble and which is improved in terms of operability. The solenoid is provided with a snap ring 22 which helps to integrate the molded coil 2 and the solenoid main body 3 into one, whereby it is possible to finally integrate the molded coil 2 and the solenoid main body 3 with each other after various operation processes; by finally attaching the molded coil 2, the lead wire 9 extending from the molded coil 2 constitutes no obstacle, and the assembly is facilitated, thus achieving an improvement in terms of operability.