B
BOOGIEMAN
//Why this doesn't work :
using System;
using System.Threading;
class RandomObjectDemo
{
public static void Main( )
{
Thread.Sleep( 1 );
int RND01 = randObj.Next( );
double RND02 = randObj.NextDouble( );
Console.WriteLine("RND01 = " + RND01 );
Console.WriteLine("RND02 = " + RND02 );
}
}
----------------------------------
//Example above is my rework from this, which works :
using System;
using System.Threading;
public class RandomObjectDemo
{
static void RunIntNDoubleRandoms( Random randObj )
{
int RND01 = randObj.Next( );
double RND02 = randObj.NextDouble( );
Console.WriteLine("RND01 = " + RND01 );
Console.WriteLine("RND02 = " + RND02 );
}
static void Main( )
{
Thread.Sleep( 1 );
Random autoRand = new Random( );
RunIntNDoubleRandoms( autoRand );
}
}
using System;
using System.Threading;
class RandomObjectDemo
{
public static void Main( )
{
Thread.Sleep( 1 );
int RND01 = randObj.Next( );
double RND02 = randObj.NextDouble( );
Console.WriteLine("RND01 = " + RND01 );
Console.WriteLine("RND02 = " + RND02 );
}
}
----------------------------------
//Example above is my rework from this, which works :
using System;
using System.Threading;
public class RandomObjectDemo
{
static void RunIntNDoubleRandoms( Random randObj )
{
int RND01 = randObj.Next( );
double RND02 = randObj.NextDouble( );
Console.WriteLine("RND01 = " + RND01 );
Console.WriteLine("RND02 = " + RND02 );
}
static void Main( )
{
Thread.Sleep( 1 );
Random autoRand = new Random( );
RunIntNDoubleRandoms( autoRand );
}
}