1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
class RND
{
private Random rnd;
/// <summary>
/// Initializes a new instance of the <see cref="RND"/> class.
/// </summary>
public RND()
{
rnd = new Random();
}
/// <summary>
/// Gets the random boolean.
/// </summary>
/// <returns></returns>
public bool GetRandomBoolean()
{
return rnd.Next(0, 2) == 0;
}
}
|