Gauss’s law in electrostatics states that the surface integral of the electrostatic field E(vector) over a closed surface S is equal to $\large\frac{1}{\in_0}$  times the total charge q enclosed by the surface S, $\int E(vector)*ds(vector)=q/ \in_0$ Suppose that the closed surface S encloses an electric dipole which consists of two equal and opposite charges.Then the total charge enclosed by is zero dipole over the closed surface is also zero. $\int E(vector)*ds(vector)$= zero  Now a magnetic field is produced only by a magnetic dipole because isolated magnetic poles do not exist,so the above  equation for a magnetic field can be written as \$\int B(vector)*ds(vector)=0 This is Gauss’s law in magnetism which states that the surface of a magnetic field over a closed surface is always one .But the surface integral of a magnetic field over a surface gives magnetic flux through that surface.So gauss’s in magnetism can be stated as follows: The net magnetic flux through a closed surface is zero  Consequences of Gauss’s law:1.Gauss’s law indicates that there are no sources or sinks of magnetic field inside a closed surface .So there is no point at which the field lines terminate.In other words,there are no free magnetic charges.Hence isolated magnetic poles do not exist. 2.The magnetic poles always exist as unlike pairs of equal strengths. 3.If a number of magnetic lines of force enter a closed surface,then an equal number of lines of force must leave that surface.