We give a new characterization of Nikolskii-Besov classes of functions of fractional smoothness by means of a nonlinear integration by parts formula in the form of a nonlinear inequality. A similar characterization is obtained for Nikolskii-Besov classes with respect to Gaussian measures on finite- and infinite-dimensional spaces.