< Dice | RollResult
Difference between revisions of "Dice/RollResult/InvalidRoll"
From DiceRoller Documentation
(Created page with "{{APIdoc|RollResult.InvalidRoll Field}} This RollResult is used as a placeholder whenever an invalid roll is added to a {{l|Dice.PbP.RollPost|RollPost}}. {{ns}} == Syntax ==...") |
(No difference)
|
Revision as of 22:02, 15 September 2017
This RollResult is used as a placeholder whenever an invalid roll is added to a RollPost.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Syntax
public static readonly RollResult InvalidRoll
Field Value
Type: Dice.RollResult
The placeholder result indicating an invalid roll.
Remarks
This is a sentinel value used for invalid rolls. You can test if a given roll is invalid by using the {{{1}}} operator. For example, {{{1}}}. Do not attempt to compare using reference equality, as a deserialized RollResult may be an invalid roll but will be a different object (in memory) than RollResult.InvalidRoll. In other words, ensure that both sides of the equality comparison are cast to RollResult before executing the check.