Note that the Floor method may behave differently than you might expect for negative values. For example, Math. The Math class contains a number of additional methods for making trigonometric and logarithmic calculations. Generating Random Numbers Using the System. Random Class The System.
Random class is used to draw a random number.
Unlike VB's Rnd function, however, System. Random can return both decimal and whole random numbers. Also, unlike Rnd, System. Random automatically seeds its random number generator with a random value derived from the date and time. Use the NextDouble method of System.