SampleClassGetRandomNumber Method

This returns a random number

Definition

Namespace: XMLCommentsExamples
Assembly: XMLCommentsExamples (in XMLCommentsExamples.dll) Version: 2014.1.26.0
public int GetRandomNumber()

Return Value

Int32
A random number using SampleNumber as the seed.

Example

The following example demonstrates the use of this method.
C#
// Get a new random number
SampleClass sc = new SampleClass(10);

int random = sc.GetRandomNumber();

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

See Also