SampleClassGetRandomNumber Method
This returns a random number
Namespace: XMLCommentsExamplesAssembly: XMLCommentsExamples (in XMLCommentsExamples.dll) Version: 2014.1.26.0
public int GetRandomNumber()
Public Function GetRandomNumber As Integer
public:
int GetRandomNumber()
member GetRandomNumber : unit -> int
Return Value
Int32A random number using
SampleNumber as the seed.
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.