  We study the influence of thermal fluctuations on the magnetic behavior of
square mesoscopic superconductors. The strength of thermal fluctuations are
parameterized using the Ginzburg number, which is small ($G_i \approx
10^{-10}$) in low-$T_c$ superconductors and large in high-$T_c$ superconductors
($G_i \approx 10^{-4}$). For low-$T_c$ mesoscopic superconductors we found that
the meta-stable states due to the surface barrier have a large half-life time,
which leads to the hysteresis in the magnetization curves as observed
experimentally. A very different behavior appears for high-$T_c$ mesoscopic
superconductors where thermally activated vortex entrance/exit through surface
barriers is frequent. This leads to a reduction of the magnetization and a
non-integer average number of flux quanta penetrating the superconductor. The
magnetic field dependence of the probability for the occurrence of the
different vortex states and the fluctuations in the number of vortices are
studied.
