I. Introduction
In the Random
class for creating random numbers. (Of course, it is pseudo-random.)
Two, Random usage
Example:
RND = new new the Random the Random (); int = month The rnd.Next (1, 13 is); // Create is a number between 1 to 12 int dice = rnd.Next (1, 7 ); // Create a digital is between -. 6. 1 int = rnd.Next Card (52 is); // Create is a number between 0 and 51
Next Random class provided, and nextBytes NextDouble ways to generate integer type, byte array type, and a random number of double precision floating point type, described in detail in the following table.