< Dice‎ | Roller
Revision as of 20:12, 23 December 2018 by Skizzerz (talk | contribs) (Created page with "{{APIdoc|Roller.Roll Method (String, RollerConfig, RollData)}} Rolls dice according to the given dice expression and with the given RollData. Please see Dice Reference for...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Roller.Roll Method (String, RollerConfig, RollData)

From DiceRoller Documentation

Rolls dice according to the given dice expression and with the given RollData. Please see Dice Reference for more information about dice expressions.

  • Namespace: Dice
  • Assembly: DiceRoller (in DiceRoller.dll)

Syntax

public static RollResult Roll(
    string diceExpr,
    RollerConfig config,
    RollData data
)

Parameters

diceExpr
Type: System.String
A dice expression.
config
Type: Dice.RollerConfig
Configuration to use for this roll. If null, the DefaultConfig will be used.
data
Type: Dice.RollData
Additional data that is scoped to this roll.

Return value

Type: Dice.RollResult

The result of rolling diceExpr.

Exceptions

Exception Condition
ArgumentNullException diceExpr is null.
DiceException An error was detected with diceExpr.

When a DiceException is thrown, the exception will contain an ErrorCode property which describes the error in more detail.