In the case of identical twins, if male DNA is found, then both babies are boys. If no male DNA is found, then both babies are girls.

For fraternal twins (or more!), finding male DNA will confirm at least one baby is a boy, but cannot distinguish if the second is a boy or girl.