Show / Hide Table of Contents

Class RandomService

Inheritance
System.Object
RandomService
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: CommonBotLibrary.Services
Assembly: cs.temp.dll.dll
Syntax
public class RandomService

Properties

Generator

Declaration
public static Random Generator { get; }
Property Value
Type Description
Random

Methods

FlipCoin()

Flips a pseudo-random coin.

Declaration
public bool FlipCoin()
Returns
Type Description
System.Boolean

True if heads, false if tails.

Roll(Die)

Rolls a pseudo-random die.

Declaration
public int Roll(Die die = null)
Parameters
Type Name Description
Die die

The die to roll. Six-sided if null.

Returns
Type Description
System.Int32

The result of the roll.

Remarks

If explicitly using an langword_csharp_int as an argument, check the langword_csharp_Factory() method in for exception docs.

Back to top © 2017 - Borja Canseco