Vasectomy is the cutting and tying of vas deferens in males to prevent the passage of sperms into the female reproductive system. Vasectomy is a contraceptive method and does not prevent the production of sperms but provides a surgical barrier to the passage of sperms.
ie,if it is surgically blocked,the sperms won't we ejected to semen.