We calculate the heat capacity of electrons as a function of the electron density and temperature in two-direction double-barrier resonant-tunnelling structures. The strength of the barrier potential increases in one direction, so that the system becomes 2D; the heat capacity as a function of the electron density goes to a step-like shape, which is similar to the one in the DOS. From 2D to 1D, the heat capacity reflects the peaks in the DOS with increasing electron density, and becomes a sawtooth-like shape in 1D. However, an asymmetric peak in the DOS makes two peaks in the heat capacity because the available DOS in thermal excitations becomes smaller as the chemical potential approaches the peak in the DOS. The heat capacity shows a linear dependence on the temperature in 3D and 2D, but not in 1D even at low temperatures. It exhibits a square-root T dependence when the chemical potential is located near a pole in the DOS.