SampleClass.GetRandomNumber Method

Sandcastle XML Comments

Sandcastle XML Comments GuideSampleClassGetRandomNumber Method
This returns a random number

Namespace: XMLCommentsExamples
Assembly: XMLCommentsExamples (in XMLCommentsExamples.dll) Version: 2014.1.26.0
Syntax
public int GetRandomNumber()
Public Function GetRandomNumber As Integer
public:
int GetRandomNumber()
member GetRandomNumber : unit -> int 

Return Value

Type: Int32
A random number using SampleNumber as the seed.
Examples
The following example demonstrates the use of this method.
// Get a new random number
SampleClass sc = new SampleClass(10);

int random = sc.GetRandomNumber();

Console.WriteLine("Random value: {0}", random);
' Get a new random number
Dim sc As SampleClass = New SampleClass(10)

Dim random As Integer = sc.GetRandomNumber()

Console.WriteLine("Random value: {0}", random)

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

See Also