Gauss's Law states that the electric flux through a closed surface is proporational to the electrical charge inside. This holds true regardless of the volume or shape of the closed surface. This is one of the most fundamental principles of electrodynamics, and is a Maxwell equation.
In integral form, Gauss's Law is this:
where is the electric potential (flux), is the electric field, is a differential area on the closed surface S with an outward facing surface normal defining its direction, is the charge enclosed by the surface, is the charge density at a point in , is a constant for the permittivity of free space and the integral is over the surface S enclosing volume V.