an object of the present invention is to improve operability . stoppers are detachably mounted in a lower mold of a mold . nuts are screwed down onto the stoppers while being held upside down . after the mold is closed in this state and molten resin is filled into a cavity and solidified therein , the mold is opened . the stoppers are separated from the lower mold as the mold is opened . when the stoppers are separated from the nuts thereafter , a casing 10 having no pin withdrawal hole can be obtained . accordingly , it is not necessary to apply potting or the like to close the pin withdrawal hole .