var rand = new Random();
rand.NextDouble() >= 0.5;
Random random = new Random();
bool randomBool = random.Next(2) == 1;
if (maxValue < 0)
{
throw new ArgumentOutOfRangeException("maxValue",
Environment.GetResourceString("ArgumentOutOfRange_MustBePositive", new object[] { "maxValue" }));
}
return (int) (this.Sample() * maxValue);