Can I choose to have IVF for gender selection?

Can I choose to have IVF for the sake of gender preference?