Difference between revisions of "Dice/RollResult"

From DiceRoller Documentation
Line 19: Line 19:
 
|-
 
|-
 
| {{internal}} {{method}} || [[/RollResult|RollResult(DiceAST, Int32)]] || Constructs a new instance of RollResult.
 
| {{internal}} {{method}} || [[/RollResult|RollResult(DiceAST, Int32)]] || Constructs a new instance of RollResult.
 +
|}
 +
 +
== Methods ==
 +
{| class="wikitable"
 +
! style="width: 5em" |
 +
! Name !! Description
 +
|-
 +
| {{public}} {{method}} || [[/ToString|ToString()]] || Display a representation of the roll. Overrides Object.ToString().
 
|}
 
|}
  

Revision as of 03:28, 14 April 2017

Contains the result of a roll expression.

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

Inheritance Hierarchy

System.Object

Dice.RollResult

Syntax

public class RollResult

Constructors

Name Description
RollResult(DiceAST, Int32) Constructs a new instance of RollResult.

Methods

Name Description
ToString() Display a representation of the roll. Overrides Object.ToString().

Properties

Name Description
NumRolls The number of dice rolls that were needed to fully evaluate this expression.
ResultType Gets whether or not Value represents the die total or the number of successes.
RollRoot Gets the root of the dice expression's abstract syntax tree.
Value Gets the result of the roll.
Values Gets the results of each individual die rolled.

Remarks

RollResults are returned from the Roller.Roll method, and can be used to obtain the results of the roll. This class is read-only. Typically, Value and Values are the only properties that are needed in the course of normal operations, however the full AST is exposed for advanced insight into the roll, should such be necessary.