Compartir a través de


Random Class

Definition

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
Public Class Random
Inherits XppObjectBase
Inheritance
Microsoft.Dynamics.AX.KernelInterop.ProxyBase
Random
Attributes

Remarks

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(); 
    } 
}

Constructors

Random()
Random(IntPtr)

Fields

__k_RandomId
kernelClass (Inherited from XppObjectBase)

Methods

__shouldCallNew(Type)
addXppProxyReference(Type, Object) (Inherited from XppObjectBase)
Call(String, Object[], Type[], Object[]) (Inherited from XppObjectBase)
cancelTimeOut(Int32) (Inherited from XppObjectBase)
createKernelClass(Object[], Type[], Object[]) (Inherited from XppObjectBase)
equal(XppObjectBase) (Inherited from XppObjectBase)
finalize() (Inherited from XppObjectBase)
GetIntPtr() (Inherited from XppObjectBase)
GetKernelInstanceUniqueId() (Inherited from XppObjectBase)
getTimeOutTimerHandle() (Inherited from XppObjectBase)
getXppProxyReference(Type) (Inherited from XppObjectBase)
handle()
IsManagedValid() (Inherited from XppObjectBase)
kernelhandle()
KernelInstanceDisposed() (Inherited from XppObjectBase)
MakeReflectionCall(String, Object[]) (Inherited from XppObjectBase)
newmethod()

Initializes a new instance of the Random class.

nextInt()

Returns the next random number from the random generator.

notify() (Inherited from XppObjectBase)
notifyAll() (Inherited from XppObjectBase)
objectOnServer()
Obsolete.
(Inherited from XppObjectBase)
setTimeOut(String, Int32, Boolean)
Obsolete.
(Inherited from XppObjectBase)
setTimeOut(String, Int32)
Obsolete.
(Inherited from XppObjectBase)
usageCount() (Inherited from XppObjectBase)
VerifyKernelClass() (Inherited from XppObjectBase)
wait() (Inherited from XppObjectBase)
Xml() (Inherited from XppObjectBase)
Xml(Int32) (Inherited from XppObjectBase)

Applies to