Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The Random class generates random numbers.
public ref class Random : Microsoft::Dynamics::Ax::Xpp::XppObjectBase
[Microsoft.Dynamics.Ax.Xpp.KernelClass]
public class Random : Microsoft.Dynamics.Ax.Xpp.XppObjectBase
[<Microsoft.Dynamics.Ax.Xpp.KernelClass>]
type Random = class
inherit XppObjectBase
Because this class operates on a global random generator, the individual random objects will interfere with each other. Therefore, it is not possible to predict the sequence of numbers for a specific random object.
The following example prints 100 random numbers.
static void example()
{
Random myRand = new Random();
int i;
for(i=0;i<100;i++)
{
print myRand.nextInt();
}
}